D
Diane Y
I'm having major issues with an unbound datagrid.
During the first page load (I don't do this on postback), I programmatically
create a dataset with one table and one row and bind it to the datagrid.
The dataset is stored in a page-level, shared variable.
I've got a button in the footer of the datagrid with a command name of
"Insert". When the button is clicked, I have some code in the onItemCommand
event to add a row to the dataset and rebind it to the datagrid. That works
fine, but of course, I lose any changes to the datagrid that were made
before the insert button was pushed.
I thought I'd loop through the datagrid items (in the onItemCommand event)
and update the dataset with the new values before I rebind the datagrid.
Unfortunately, the datagrid items collection only has one item - a footer -
which is crazy because it should have *at least* a header and a footer and
also one item.
Can anyone offer any suggestions as to why my datagrid seems to be getting
lost on postback?
Diane
During the first page load (I don't do this on postback), I programmatically
create a dataset with one table and one row and bind it to the datagrid.
The dataset is stored in a page-level, shared variable.
I've got a button in the footer of the datagrid with a command name of
"Insert". When the button is clicked, I have some code in the onItemCommand
event to add a row to the dataset and rebind it to the datagrid. That works
fine, but of course, I lose any changes to the datagrid that were made
before the insert button was pushed.
I thought I'd loop through the datagrid items (in the onItemCommand event)
and update the dataset with the new values before I rebind the datagrid.
Unfortunately, the datagrid items collection only has one item - a footer -
which is crazy because it should have *at least* a header and a footer and
also one item.
Can anyone offer any suggestions as to why my datagrid seems to be getting
lost on postback?
Diane