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

[Solved] PreviewDataRecordCreate and ChildTableDefinitions

4 Answers 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alan
Top achievements
Rank 2
Alan asked on 29 Jun 2009, 06:42 PM
Is there any way to add a ChildTableDefinition to a TableDefinition as well as use the PreviewDataRecordCreate event to specify which rows to set IsExpandableRecord?

It seems if I do not add a ChildTableDefinition, then I can correctly set IsExpandableRecord based on a condition of a row.  But, if I add a ChildTableDefinition, the IsExpandableRecord property is just ignored, and *every* row has the expander.

My goal is to have the child expander only on certain rows and then dynamically create a ChildTableDefintion for a row that is expanded.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 30 Jun 2009, 06:26 AM
Hello Alan,

Since the grid will load your child data on demand you can safely add desired table definition in PreviewDataRecordCreate event.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alan
Top achievements
Rank 2
answered on 30 Jun 2009, 01:19 PM
To clarify, I don't have the child table data until the user clicks the expander (and I only want the expander for rows meeting a certain condition).

I only want to be able to view child tables for specific rows.  That's why I used PreviewDataRecordCreate to set IsExpandableRecord to false on many of the rows.  However, as soon as I add a ChildTableDefinition, the grid sets all of my rows to be expandable, even though I set most of them to not be expandable.

0
Vlad
Telerik team
answered on 03 Jul 2009, 05:41 AM
Hi Alan,

Can you post you code where these child definitions are added?

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Alan
Top achievements
Rank 2
answered on 06 Jul 2009, 01:02 PM
Our requirements have changed slightly, so I no longer need the desired behavior I'm looking for right now.  I'll post back if I still need assistance.  Thanks for your help!
Tags
GridView
Asked by
Alan
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Alan
Top achievements
Rank 2
Share this question
or