Reputation: 3929
Q1
A) On a postback, when in the page’s life cycle are GridView’s rows populated with all the values it had before user issued a postback? Thus at what point does GridView already have all the values it displayed on user’s page?
I’m assuming this happens the same time it happens with other controls, which is during Load ViewState Data stage?!
B) Text user entered into TextBox control is made available after Load Postback Data stage. Shouldn’t changes user made to GridView’s fields also be available after Load Postback Data stage?
Q2 - Are there any differences between the way SelectedIndexChanged event is handled when DropDownList is defined inside GridView’s template and when DropDownlist is defined outside GridView? Meaning, is in both cases the event fired at the same point in Page’s life cycle?
thanx
Upvotes: 0
Views: 2224
Reputation: 36027
See Control Execution Lifecycle in msdn to clear any confussion around the control lifecycle.
A) that's right, during load view state.
B) Yes, they should be available, which means they are available on page load.
Q2 in the same point in the page's life cycle: yes, during Send postback change notifications. Warning: the following conditions could affect it:
Upvotes: 4