This is a migrated thread and some comments may be shown as answers.

Hierarchical Grid - How to?

8 Answers 424 Views
GridView
This is a migrated thread and some comments may be shown as answers.
what
Top achievements
Rank 1
what asked on 08 Aug 2007, 12:10 AM

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

Sort by
0
Dwight
Telerik team
answered on 08 Aug 2007, 08:08 AM
Hello Mark,

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
0
Kris
Top achievements
Rank 1
answered on 18 Jun 2008, 04:46 PM
Hi, this posts may be in the wrong spot, so feel free to move it. I have two issues with the RadGridView. The first is....I have a column with the fore color(text) blue to signify they can double click on it and another form will pop up. This grid is hierarchical. When I click on the + sign to expand the row, the column with the blue text remaining rows in the parent table suddenly changes the text color back to black. Any ideas why? And the second is...I want the user to have the ability to filter the rows using the built in filter row. The problem I run into is that the filtering won't work when AllowEditRow=false. Both the radgridview.EnableFiltering and radgridview.MasterGridViewTemplate.EnableFilter are set to true. But when I set AllowEditRow=true, the user can no longer double click on the blue column to pop up another form(because it thinks it is a row edit command, I think).  Any help would be appreciated, thanks.

Kris
0
Martin Vasilev
Telerik team
answered on 20 Jun 2008, 02:58 PM
Hello 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
0
Kris
Top achievements
Rank 1
answered on 03 Jul 2008, 05:56 PM
I have submitted a ticket support #147978 for this item. Thanks.

Kris
0
Nikolay
Telerik team
answered on 04 Jul 2008, 02:01 PM
Hello 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
0
Thomas
Top achievements
Rank 1
answered on 24 Jul 2008, 05:26 AM
I am trying to use datarelations to bind arbitrary grid depth to this control.  This is easy with Infragistics.  I just read through the "declarative" method for hierarchical binding and it is absurd.  How can you guys instruct me to just take a hierarchical datasource with valid datarelations and bind with no cumbersome markup or event rigging.  Thanks, Tommy
0
Nikolay
Telerik team
answered on 25 Jul 2008, 03:36 PM
Hi Thomas,

RadGridView supports both declarative and automatic approaches for creating hierarchy from a DataSet. In order to use the automatic approach, please follow these steps:
  1. Set RadGridView.DataSource to the DataSet.
  2. Set the DataMember to be the main DataTable in the hierarchy.
  3. 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,

Nikolay
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Thomas
Top achievements
Rank 1
answered on 31 Jul 2008, 02:44 PM
Thank you Nikolay!  That is so much easier than the way I figured out using your NeedDataSource & DetailTableDataBind delegates plus CreateChildView.  Next time I fire up a grid, I will try this "AutoGenerateHierarchy".  Good day to you sir.
Tags
GridView
Asked by
what
Top achievements
Rank 1
Answers by
Dwight
Telerik team
Kris
Top achievements
Rank 1
Martin Vasilev
Telerik team
Nikolay
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or