I have a sub named Bind("") which binds my a datagrid on my webform. In
order to enter edit mode and edit records on this datagrid, I must make a
call to Bind("") either before or after I place the DataGrid into edit mode.
For example, DataGrid.EditCommand looks like this ...
DataGrid1.EditItemIndex = e.Item.ItemIndex
Bind("")
Without having the Bind("") call within the EditCommand, an exception occurs
saying something to the extent of..."Failed to enable viewstate...".
The problem with including a call to Bind("") within the EditCommand is that
if there is a sort applied to my datagrid at the time the user enters 'Edit'
mode, the datagrid removes the sort, applying the original sort that it
possesses at load time, and the incorrect record is placed in EDIT mode. How
can I work around this?
Thanks.