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

Programmatically configuring DetailTables

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam Macaulay
Top achievements
Rank 1
Adam Macaulay asked on 14 Apr 2010, 01:34 PM
Hello,

I'm trying to take advantage if the new AutogenerateHierarchy feature of the RadGrid.  Once I assign the data source, I'd like to programmatically apply certain formatting like sorting, grouping, etc to the Master and DetailTables.  So my question is - how do I access the DetailTables if all I have is the tables' names?  I really wish I could do something like myGrid.Tables[tableName].SortExpressions.  What's the best elegant way I can set these properties?

Thank you for your help!

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 14 Apr 2010, 05:12 PM
Hello Adam,

You can set the Name property of the DetailTable and then in the ItemDataBound/ItemCreated event of the grid check for the name of the ownertableview and then traverse through the detail table items:
Distinguish grid rows in hierarchy on ItemCreated/ItemDataBound

All the best,
Pavlina
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
Adam Macaulay
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or