Datagrid with Dataset and Multiple Tables
-
I have datagrid with a dataset set as the DataSource. I have added a X number of tables to the dataset, but when I view my datagrid it shows all the tables in the datagrid but I can only view the first table. The other tables don't show when I click or navigate onto them. How do I get it to open or view the other tables?
DataSet dataset = new DataSet("Sms Report"); dataset.Tables.Add(sendItemsTable); packagesTables = new DataTable[sendItemsTable.Rows.Count]; for(int i = 0; i < distinctPackagesTable.Rows.Count; i++) { packagesTables[0] = //..Data that I query; } if(packagesTables.Length > 0) dataset.Tables.AddRange(packagesTables); dataset.AcceptChanges(); dataGrid.DataSource = dataset; dataGridStyle1.MappingName = dataGrid.DataMember; dataGrid.Expand(0);
Leon v Wyk