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

RadGrid NestedView expand event

1 Answer 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 24 Jun 2012, 06:08 PM
Hi, I would like to be able to assign custom content to the NestedView (a literal control inside the nestedview) - only when the arrow is clicked and the view gets expanded.

At that point, I would find a literal control and add content dynamically. I do not want to assign the literal on ItemDataBound as that would find and populate all the literal controls - this is not desirable as they are going out and building feeds from external services and the performance would be terrible.

So what I am looking for is an event to work from, but the ItemCommand would not work, because the literalControl is not yet created/cannot be found in the page life cycle. Any creative thoughts welcome.

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 28 Jun 2012, 08:10 AM
Hello Karl,

Please note that the only possible approach in this case is to use the ItemDataBound event where the Literal is available. However this will not be a problem as in case you have ServerOnDemand hierarchy load mode the event will fire only in case the NestedViewTemplate is expanded. You could event check if the item is expanded in the ItemDataBound event and then apply the needed logic for binding the literal.
I hope this helps.

Greetings,
Maria Ilieva
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or