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

Multiple DetailKeyField MasterKeyField

3 Answers 188 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nikhil
Top achievements
Rank 1
Nikhil asked on 26 Jul 2010, 07:14 AM
Hello

I want to know how can I implement Multiple DetailKeyField  MasterKeyField b/w parent and detail table view.  I am developing 5 level grid and want to show data on detail table from parent table, hotel_booking_id and seqnum column in detail view table.

Thanks

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 29 Jul 2010, 07:51 AM
Hello Nikhil,

RadGrid's ParentTableRelation property does support multiple master/detail keys, you just need to specify a separate GridRelationFields collection for each. For example:

<ParentTableRelation>
    <telerik:GridRelationFields DetailKeyField="hotel_booking_id" MasterKeyField="hotel_booking_id" />       
    <telerik:GridRelationFields DetailKeyField="seqnum" MasterKeyField="seqnum" />                        
</ParentTableRelation>

More information you can find at the following help topic:
http://www.telerik.com/help/aspnet-ajax/grdhierarchicaldatabindingusingneeddatasource.html

Hope it helps.

Regards,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Nikhil
Top achievements
Rank 1
answered on 29 Jul 2010, 08:03 AM
Thanks Tsvetoslav  for your Reply.
But This will not help me. I need to make realtion b/w detail table 2 with deatil table 3 and 5 of 5 level grid. So how can i achive this.

Regards
Nikhil Jain
0
Tsvetoslav
Telerik team
answered on 30 Jul 2010, 10:13 AM
Hello Nikhil,

In this case you will have to manually bind the detail tables using the DetailDataBind event of the RadGrid control. In the event handler you can access any parent level through e.Item.OwnerTableView.ParentItem property and extract the necessary parent data keys. More information you can find at the following online example and the related help topics:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx

All the best,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Nikhil
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Nikhil
Top achievements
Rank 1
Share this question
or