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

[Solved] Hierarchy with Templates

2 Answers 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John Cooney
Top achievements
Rank 1
John Cooney asked on 15 Mar 2010, 06:17 PM
I'm trying to get a section of code working based upon this example here:

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

I am getting an error at the spot where in the Telerik example they are displaying the DetailsView.

The error is saying that the DetailsView can not find the SqlDataSource which it is pointed at and yet the two items are right next to each other in the source code.

Even if I just experimentally add another control right there like a grid and use the smart tag and select a data source it sees it in the dropdown of choices for data sources but when I run the page in testing I get this error.

There must be some loss of context here and I just can't figure out what's going on.

I seem to have made the mistake of wearing my dunce cap to work today.  Any help appreciated.

2 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 16 Mar 2010, 10:52 AM
Hi John,

To data bind the nested view template, RadGrid exposes an additional property for its table view objects called NestedViewSettings. The NestedViewSettings allow you to specify a data source object contained on the page to which the template should be bound, as well as a relation to the parent level. These two properties can be defined declaratively or programmatically through the NestedViewSettings.DataSourceID and NestedViewSettings.ParentTableRelation properties respectively. The ParentTableRelation is specified in the same way as the declarative relations for hierarchical tables.

More information is available here:
NestedView template

I hope this helps.

Greetings,
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.
0
John Cooney
Top achievements
Rank 1
answered on 19 Mar 2010, 01:19 AM
Thanks!  This works great.

Your team does a fantastic job supporting this product but I would make one minor point here.

I followed an example which is apparently a non-current implementation without knowing that fact. 

I would suggest that if it were possible, you could update parts of the examples in the website by indicating that a certain technique had been superceded by a more current technique.
Tags
Grid
Asked by
John Cooney
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
John Cooney
Top achievements
Rank 1
Share this question
or