Hello,
I have a grid with a DetailTable and dynamically created columns in that DetailTable. I use the ColumnCreating event to modify the HeaderTexts of the dynamic columns. When I use the standard Expand/Collapse Column everything works fine: the ExpandCommand gets fired, the DetailTable is bound and the ColumnCreating event is fired.
Now I want to automatically expand an item based on conditions that I get from a session variable (which contains the index of the item to expand) without a preceding postback. So in the PreRender Event of the RadGrid I loop through the GridDataItems and if the ItemIndex matches the index retrieved from the session variable I set item.Expanded = true. Now everything seems to work as expected but the ColumnCreating event is not fired hence I can't set the HeaderTexts of the columns.
What am I doing wrong? Expanding an item in the PreRender event only works after a postback. When it's a normal page request the ColumnCreating event isn't fired. I tried to use different events to set the expanded item but with no success.
The grid architecture is pretty complex so it's difficult to post code or a sample project.
Thanks for your help.
Best regards
Sebastian