views:

308

answers:

0

I have a GridView control with one editable column (with input text box in it bound to domain object).

The ViewState is getting large for this control and I want to disable it. But, with ViewState disabled, GridView refuses to update bound values. It's pretty obvious, that GridView can't restore all it's controls before LoadPostData getting fired, and no post-back data getting into that controls.

I have tried to rebind the grid view during OnInit, but the trick is, that GridView getting bounded 2 times and ID's of controls differs ( "ctl00_MainContent_grdOutstanding_ctl02_FlashForCurrentWeek" vs "ctl00_MainContent_grdOutstanding_ctl03_FlashForCurrentWeek" ).

So, how to restore controls in GridView properly?