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

hierarchical grid

6 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mww
Top achievements
Rank 1
mww asked on 03 Feb 2009, 11:07 AM
can anyone show me where I can find some examples of hierarchical data in a grid ?
I have 2 tables (master and detail).  I need the examples in c#

6 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 03 Feb 2009, 11:33 AM
Hello Mark,

Please examine the following resources:

Documentation:
What you should know
Understanding hierarchical grid structure
Creating hierarchical grids from design-time

Demos:
Three-level hierarchy
Several tables at a level
Hierarchy with declarative relations
Hierarchy with DetailTableDataBind event

Let us know if you need more information.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mww
Top achievements
Rank 1
answered on 03 Feb 2009, 03:29 PM
Ive looked at the examples and modified it to suit my needs.  I only have one details table, the contents of this table are determined by the contents of 2 columns in the master table (neither of which is the datakey)  How can I obtain these values in the 

 

DetailTableDataBind event ?

0
Daniel
Telerik team
answered on 03 Feb 2009, 03:53 PM
Hello Mark,

For your convenience I attached a simple examine to this post.

I hope this helps.

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mww
Top achievements
Rank 1
answered on 03 Feb 2009, 04:12 PM
How do I work with insert, delete and updates  for the master and detail tables ?
0
mww
Top achievements
Rank 1
answered on 03 Feb 2009, 04:19 PM
I dont want all the values in the parent control.  Isnt there some way of getting the value of a specific column in the parent grid ?

for instance, the master table has 3 columns

ID , ArtistID &  Genre

I only need the values contained in the genre  and ArtistID columns to determine the contents of the detail table
0
Daniel
Telerik team
answered on 06 Feb 2009, 09:06 AM
Hello Mark,

Alternative approach is to access the cell contents directly.
protected void RadGrid1_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e) 
    if(yourCondition) 
    { 
        GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; 
        string artistID = dataItem["ArtistID"].Text; 
    }  

Let us know whether this helps.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
mww
Top achievements
Rank 1
Answers by
Daniel
Telerik team
mww
Top achievements
Rank 1
Share this question
or