A
aabdis
Here is the problem:
I create a grid, which in ItemCreated() adds in custom header rows on
changes in a particular field's value. All fine-and-dandy the first time
through. On postback however, since the "row" controls were dynamic, they
are no longer there. This of course screws up eventhandlers and such since
now the controls on the page dont match the controls in the viewstate.
How can i recreate those headers? The query that the grid is based on is a
long-running search query and so it really is not desirable to do a re-bind
on the grid. ItemCreated doesnt work anymore, since the grid now no longer
has a datasource. I tried storing all the custom rows and their indices in a
collection server-side and manually re-adding them on postback, but the IDs
do not match up and in fact i wound up getting duplicate ids in the control
tree, which of course ASP complained about.
So how in the world are you supposed to handle custom rows on the postbacks?
Thanks in advance for any help, advice, recommendations, etc.
- --
I create a grid, which in ItemCreated() adds in custom header rows on
changes in a particular field's value. All fine-and-dandy the first time
through. On postback however, since the "row" controls were dynamic, they
are no longer there. This of course screws up eventhandlers and such since
now the controls on the page dont match the controls in the viewstate.
How can i recreate those headers? The query that the grid is based on is a
long-running search query and so it really is not desirable to do a re-bind
on the grid. ItemCreated doesnt work anymore, since the grid now no longer
has a datasource. I tried storing all the custom rows and their indices in a
collection server-side and manually re-adding them on postback, but the IDs
do not match up and in fact i wound up getting duplicate ids in the control
tree, which of course ASP complained about.
So how in the world are you supposed to handle custom rows on the postbacks?
Thanks in advance for any help, advice, recommendations, etc.
- --