DataMember property can only remember one assignment, since you are assigning a value in a for loop, it is going to remember only the last table name from your data set collection.
Are you building a WinForms app or Web app Are you using .NET 1.1 or .NET 2.0 If you are using GridView in .NET 2.0 (at least you named your control as GridView) it can only show one table.
Can you post the code where you load XML into dataset
help with data set
TomChung
Manidkn
ok here is the code i put together
foreach (DataTable dt in ds.Tables){
XMLDATA_dataGridView.DataMember = dt.TableName;
}
XMLDATA_dataGridView.Show();
the porblem is when it pops up (data viewer) it shows no data. What am i missing Also i do have data in my data set so that is ok
cisco
MattMorg
When you set the whole DataSet, you can specify the table to display in the DataMember property.
A great article about DataBindings can be found here: Data Binding in .NET / C# Windows Forms.
myDataGrid.DataSource = myDataTable;
NJCLC
DataGrid1.DataSource = yourDataSet;
DataGrid1.DataMember = "yourTableName";
Sudeep Ghosh
Lars Kjeldsen
DataMember property can only remember one assignment, since you are assigning a value in a for loop, it is going to remember only the last table name from your data set collection.
Are you building a WinForms app or Web app Are you using .NET 1.1 or .NET 2.0 If you are using GridView in .NET 2.0 (at least you named your control as GridView) it can only show one table.
Can you post the code where you load XML into dataset