How Change Datagrid Default Mode?

What property controls the initial visible default state of a datagrid?

My application fills a datagrid during form load from a oledb database query.

When the form is loaded the datagrid is blank except for a cell with a + sign
Once the + is clicked then a second cell is shown containing a link. After the link
is clicked the grid then is filled with the data.

How can I programmatically complete the first two clicks so that when the form is loaded
the user sees a full grid of data instead of having to click on the + and then on the link.

Thanks so much

Comments

  • : What property controls the initial visible default state of a datagrid?
    :
    : My application fills a datagrid during form load from a oledb database query.
    :
    : When the form is loaded the datagrid is blank except for a cell with a + sign
    : Once the + is clicked then a second cell is shown containing a link. After the link
    : is clicked the grid then is filled with the data.
    :
    : How can I programmatically complete the first two clicks so that when the form is loaded
    : the user sees a full grid of data instead of having to click on the + and then on the link.
    :
    : Thanks so much
    :
    :
    If you bind the datagrid to a dataset you are going to get that. What you need to do is either set the datamember property to the name of the table to show or bind directly to the datatable.

    dg.datasource=ds.tables(0)

    dg.datamember="MyTableName"
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion