I should add that, with at lest .NET Framework 1.0, the second approach
should never be used, while the first one is the way to go. The difference
is that the SetDataBinding method appears to perform some inner
initializations on the DataGrid, and these initializations never occur when
the DataSource and the DataMember properties are assigned directly.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Rikki" <no@spam.no> wrote in message
news:Ok**************@TK2MSFTNGP11.phx.gbl...
I have to expand some control that appears in the datagrid, and then
select the table name
before the data is shown. How can I make this work directly??
You should try :
dataGrid1.SetDataBinding(dataset, "table");
or.....
dataGrid1.DataSource = dataset;
dataGrid1.DataMember = "table";