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

Dynamic Detail Tables for Radgrid

1 Answer 283 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Iedoc
Top achievements
Rank 1
Iedoc asked on 28 Jan 2014, 08:08 PM
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!

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Jan 2014, 04:40 AM
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
Tags
Grid
Asked by
Iedoc
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or