Dynamic Detail Tables for Radgrid

2 posts, 0 answers
  1. Iedoc
    Iedoc avatar
    6 posts
    Member since:
    May 2013

    Posted 28 Jan 2014 Link to this post

    I'm having a problem when adding detail tables to a radgrid from code behind. I'm adding the detail tables from page_load, but they do not show up until another ajax postback.

    What i want to happen, is i add a record in the radgrid. on postback, a detail table needs to be added to the table if one does not already exist. if i refresh the grid, or do any sort of postback, the expand column shows up, but it will not show up when i first add the detail table.

    Basically what i need to do is rebuild the grid it looks like, just grid.rebind() will not do the trick, as it seems rebind will rebind the data, but not the structure

    Thanks!
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2014 in reply to Iedoc Link to this post

    Hi Ledoc,

    RadGrid does not support mixing declarative grid columns with grid columns added dynamically at runtime. You should either create all the columns in the grid programmatically, or else define them all in the ASPX file. When creating Detail tables, it should be created in the PageInit event. Please go through the topic Creating a Hierarchical Grid Programmatically on this documentation Creating a RadGrid Programmatically.

    Thanks,
    Princy
Back to Top