Help with Hierarchy in RadGrid

2 posts, 1 answers
  1. Eli
    Eli avatar
    10 posts
    Member since:
    Feb 2019

    Posted 17 Mar Link to this post

    I have an ASP.NET Web Forms project i am working with and need some help with my grid.

    I have a pretty basic grid on my page. i am able to populate it mostly.

    i use codebehind to bind a list to it from c#.

     

    I need to figure out how to perform this,

    I have the proper data in my list to be bound to the grid. i want to have my rows show some important data to my customer, but when he expands the row the data in the expansion is more data from the same list, for that row.

    so when a user is browsing the grid, they can click on any row and it does its thing, but if they click the expander icon they get a bit more data about the row.

     

    I hope i explained this well, im about to break out mspaint and draw it up...

  2. Answer
    Eyup
    Admin
    Eyup avatar
    3825 posts

    Posted 20 Mar Link to this post

    Hello Elisha,

    You can use the programmatic binding provided by RadGrid to achieve this requirement:
    https://www.telerik.com/support/kb/aspnet-ajax/grid/details/how-to-bind-radgrid-properly-on-server-side

    Here you can find a live sample:
    https://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx

    Specifically, check the RadGrid1_DetailTableDataBind event handler to get the unique ID of the parent item so you can filter your inner table view data.

    I hope this will prove helpful.

    Regards,
    Eyup
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top