Expand Datagrid Problem

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

I have a datagrid which includes one table. Setting the expand
property to -1 as illustrated below isn't expanding the grid. Should I
be doing something else?

dgdQuotes.ColumnHeadersVisible=true;
dgdQuotes.Expand(-1); //expand all rows
dgdQuotes.Refresh();
 
Hi,

The WinForms data grid can be expanded only if there is more than one data
table in the data set and a data relation has been established between the
tables. The grid should not even display the [+] icons if it is bound to a
DataSet with only one table.

BTW: Ensure you pass the name of the DataTable as the dataMember argument
value when you call the SetDataBinding method on the grid.
 
Back
Top