Hi,
I'm dealing with a scenario where I want to construct a grid with multiple datasets. I.e. One grid control with multiple tables within it (each table with a different datasource).
I return the XML data from Sql Server and load the XML into multiple datasets using the DataSet's ReadXml() function.
Each DataSet in turn gets added to a dictionary with a GUID to reference it back when I need to make changes to a specific dataset.
I was looking at using the GridTableView class but I'm not sure if this will fulfill my needs.
For a quick experiment I tried doing the following:
foreach (KeyValuePair<Guid, DataSet> ds in dataSetCollection)
{
GridTableView gtv = new GridTableView(RadGrid1);
gtv.DataSource = ds.Value; //ds.Value is a DataSet object
gtv.DataBind();
RadGrid1.MasterTableView.DetailTables.Add(gtv);
}
The above doesn't seem to do anything, just a blank grid.
What am I missing here or is there any alternative route I can take to achieve the same?
Thanks for your help.
I'm dealing with a scenario where I want to construct a grid with multiple datasets. I.e. One grid control with multiple tables within it (each table with a different datasource).
I return the XML data from Sql Server and load the XML into multiple datasets using the DataSet's ReadXml() function.
Each DataSet in turn gets added to a dictionary with a GUID to reference it back when I need to make changes to a specific dataset.
I was looking at using the GridTableView class but I'm not sure if this will fulfill my needs.
For a quick experiment I tried doing the following:
foreach (KeyValuePair<Guid, DataSet> ds in dataSetCollection)
{
GridTableView gtv = new GridTableView(RadGrid1);
gtv.DataSource = ds.Value; //ds.Value is a DataSet object
gtv.DataBind();
RadGrid1.MasterTableView.DetailTables.Add(gtv);
}
The above doesn't seem to do anything, just a blank grid.
What am I missing here or is there any alternative route I can take to achieve the same?
Thanks for your help.