User400411145 posted
Hi. I have hit a bit of a problem....
I have a control which reads in from an xml file and in turn makes other controls (e.g. the xml file may tell it to create a text box and a button which it will add to its controls collection). It can also tell it to create other custom controls.
Now... it all works fine, except for 1 thing... I have a custom control which has a grid view in it. The grid view has a radio button in each row which indicates the row is selected. When the page is posted back I want to raise an event which gets the selected
row in the grid view and then changes the controls which are loaded.
The trouble I have is that the selected row is not there when I fire my event - the data has loaded into the grid but the radio button which was selected hasn't been set (I guess this is to do with the ViewState not being loaded?). It seems that by the time
the radio button is loaded from ViewState it is too late for me to change the controls.
Can anyone think of a way around this? Specifically I just want to be able to force the control with the grid view to load it's ViewState so that I can see what the selected row is and move on.
Thanks for any advice.