I want to populate a gridview and create a variable # of columns (templatefields containing textboxes) that are read in from a table. I want to create the templatefields dynamically at runtime and create the onTextchanged events for each of these dynamically created textboxes to keep track of any changes made to this editable grid. I read that dynamically created templatefields disappear during postbacks and have to be recreated on every postback.
If the controls in the templatefields disappear on every postback, how would I setup the onTextchanged events for them? Also, how would I preserve the data between postbacks?