How to bypass + in datagrid

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

Gary
vbn


Comments

  • [b][red]This message was edited by kainsworth at 2004-10-17 0:3:47[/red][/b][hr]
    In my experience, if you make the DataSET the DataSource of your DataGrid then you get the "+" symbol in the grid.
    If you make a TABLE the DataSource then the Datagrid will display the rows and columns of that Table in its grid.
    eg: using
    [code]
    DataGrid1.DataSource = DS.Tables(0)
    [/code]
    should resolve your problem (where DS is the name of a DataSet with data in it)
    You can use variations on this theme, such as:
    [code]
    DataGrid1.DataSource = DS.Tables("Table")
    ' where "Table" is the name assigned to a Table in a DataSet
    ' or
    DataGrid1.DataSource = DT
    ' where DT is a DataTable object previously created
    [/code]
    Ged

    ==================================================================

    : 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
    :
    : Gary
    : vbn
    :
    :
    :



  • Ged,

    Worked perfectly. Plus you allowed me to gain some insight and understanding which is very valuable.

    Many, many thanks for sharing your expertise and valuable time.

    vbn
    Gary


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