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

Dynamic Template Items in RadGrid

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Thompson
Top achievements
Rank 2
David Thompson asked on 17 May 2013, 02:31 PM
Telerik,

Are there plans to change how the template columns work in RadGrid so that they, too, can be dynamically created in the OnLoad event of the page?  It has been 3 years since your last post on this and I am wondering if this is something that can be fixed.  We have dynamically created grids all set up in the OnLoad page but the minute we put template columns in the ASPX page OR try and build them in the OnLoad they act funny.  I understand that this is due to how the RadGrid is initialized and if I put these columns in the RadGrid_Init routine they seem to work but on postback they make a mess as icons are put in places they should not be and other columns seem to dissapear. 

It is not possible to turn off column state on our pages and it is not practical to create the complete grid manually.  It would be AWESOME if you could put template columns on the ASPX page and then add dynamic columns around them.  This would allow us to customize a grid with icons and links but still pull all the columns from a database query.

David.

1 Answer, 1 is accepted

Sort by
0
David Thompson
Top achievements
Rank 2
answered on 17 May 2013, 02:58 PM
All,

Well I spoke too soon for my issue.  I found that the reason I was having trouble with the template column on postback when I put it in the RadGrid_Init routine was because I had a GridClientSelectColumn added dynamically and this column did not have a HeaderText value.  Once I added that, everything started working just fine.
I was thinking of removing my post altogether but then realized there might be some other people with the same problem.

David
Tags
Grid
Asked by
David Thompson
Top achievements
Rank 2
Answers by
David Thompson
Top achievements
Rank 2
Share this question
or