Hi,
I'm trying to generate columns dynamically in a RadGrid. I'm currently doing it in the Init() event of the page but when I do it there I get a viewstate error when posting back with filtering turned on. I found a solution that suggests generating the columns in the Page_Load() event, which works for the current issue. However, when I generate the columns from Page_Load(), I get an error message that it can't generate the column with specified type TempoGridDropDownColumn.
I tried with another custom column type and got the same error message. It seems when I generate them from Page_Load() it doesn't support custom column types. If I set EnableColumnsViewState to false I can make the grid work for displaying and adding data. However, without the view state enabled I'm unable to get the selected item into edit mode. When I click Edit Selected the grid structure is lost along with the selected item, so it can't change the item to an editable row.
So I need one of two things. I need to be able to create a custom column type dynamically from Page_Load with EnableColumnsViewState set to true, or I need to be able to edit the selected row with EnableColumnsViewState set to false. Any suggestions?
Shane
I'm trying to generate columns dynamically in a RadGrid. I'm currently doing it in the Init() event of the page but when I do it there I get a viewstate error when posting back with filtering turned on. I found a solution that suggests generating the columns in the Page_Load() event, which works for the current issue. However, when I generate the columns from Page_Load(), I get an error message that it can't generate the column with specified type TempoGridDropDownColumn.
I tried with another custom column type and got the same error message. It seems when I generate them from Page_Load() it doesn't support custom column types. If I set EnableColumnsViewState to false I can make the grid work for displaying and adding data. However, without the view state enabled I'm unable to get the selected item into edit mode. When I click Edit Selected the grid structure is lost along with the selected item, so it can't change the item to an editable row.
So I need one of two things. I need to be able to create a custom column type dynamically from Page_Load with EnableColumnsViewState set to true, or I need to be able to edit the selected row with EnableColumnsViewState set to false. Any suggestions?
Shane