RadGrid Custom Usercontrol Question

2 posts, 1 answers
  1. Joe
    Joe avatar
    23 posts
    Member since:
    Nov 2010

    Posted 04 Jun 2012 Link to this post

    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?
  2. Answer
    Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 07 Jun 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top