All
I am having with what appears to be a ASP.NET page life cycle issue. I currently have a user control embedded into my page. Now depending on the options chosen from the menu item list, the page can be in one of three states represented by a PageStates Enum within the control. The page on selecting the menu item merely updates the a property exposed from the control
PROBLEMS
I think the main problem I having with this is that the grid view has check boxes drawn if the page is Adding mode, however you would need to select the Adding menu item option twice to get it into this state and I believe it is because I am setting the page state when the menu item is selected however the grid rows are already created at this point ( I am dynamically creating the check boxes in the grid view within the RowCreated event
Does anyone have any suggestions as to how I get round this problem? Can this implementation ever work?
I managed to solve this in the the following manner.
The underlying problem was that I was creating my check boxes on the RoWCreated event which was happening before the page State was being updated.
So I created my own sub called createCheckBoxes which was called when the page State was changed correctly.
This has solved my problem with minimal performance overheads from my initial investigations