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

RadGrid Custom Usercontrol Question

1 Answer 46 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Joe asked on 04 Jun 2012, 08:20 PM
Greetings,

Im developing an application that uses RadGrid with a custom user control. Within this control, Im using a 2nd grid to display notes for the selected record in the 1st grid. The 2nd grid is using the the OnNeedDataSource event. How can pass the record ID opened in the 1st grid to the 2nd grid in the user control?

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 07 Jun 2012, 01:05 PM
Hello,

Thank you for contacting us.

There are couple of approach for this case, depending on the type of hierarchy you are building:

  • If the hierarchy is built as a NestedViewTemplate, then you could place label control inside the template and bind it to some of the parent item datafields. Then you could easily access this label control in the NeedDataSource event. Example that is using this approach could be found in this online demo application.
  • If you are using normal hierarchy structure with the DetailTableDataBind event then you could access the parent item as shown in this online demo application.

I hope the provided information helps. Let me know if you need further assistance.

All the best,
Andrey
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
Joe
Top achievements
Rank 2
Answers by
Andrey
Telerik team
Share this question
or