Help!
How do i set up a Master?child RadGridView ?
The following code works on other 3rd party grids but not Telerik RadGridView - why not?
Thanks
Mark
-------------------------------------------------------------------------
DataSet ds = new DataSet();
DataTable dtSummary = DbWrapper.DBSummary(); // Master
dtSummary.TableName = "Summary";
DataTable dtOrders = DbWrapper.DBOrdersPerClient(); // Child
dtOrders.TableName = "Orders";
ds.Tables.Add(dtSummary.Copy());
ds.Tables.Add(dtOrders.Copy());
DataRelation drSummaryToOrders = new DataRelation("SummaryToOrders", ds.Tables["Summary"].Columns["booking_id"], ds.Tables["Orders"].Columns["booking_id"]);
ds.Relations.Add(drSummaryToOrders);
this.radGridView1.DataSource = ds;
this.radGridView1.DataMember = "SummaryToOrders"; // error
8 Answers, 1 is accepted
Thank you for your interest in our products.
Regrettably, our RadGridView control does not support hierarchy at this time. This is its first version and there a couple of features still missing, hierarchy being one of them. This feature will be available in the second major version of the grid, which will come as part of the Q2 2007 release, scheduled for September.
Regards,
Evtim
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Kris
Thank you for writing.
I have not managed to reproduce the undesired behavior you reported. Please, send me a sample application to help me reproduce it locally. It will help me address any potential issue and provide you with further assistance.
In order to attach your files, open a new support ticket for the same issue.
I am looking forward to your response.
Best wishes,
Martin Vasilev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Kris
Please find the answer to your question in the ticket you have opened.
Regards,
Nikolay
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
RadGridView supports both declarative and automatic approaches for creating hierarchy from a DataSet. In order to use the automatic approach, please follow these steps:
- Set RadGridView.DataSource to the DataSet.
- Set the DataMember to be the main DataTable in the hierarchy.
- Set AutoGenerateHierarchy to true.
RadGridView will automatically detect the relations between the tables (starting from the main one) and will make the hierarchy for you.
If you have additional questions, feel free to contact me.
Best wishes,
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.