Code Snip: Getting the values on GridView update event
Microsoft should call it a bug, when using the GridView updating event the arguments received by the method are empty.
If you have been using the GridView and to update the value, you'll find that after pressing the update button no values come into the event. To resolve this issue, you'll have to run this on the Updating event from the GridView:
// This to populate the NewValues with the data
GridView gv = (GridView)sender;
for (int i = 0; i < GridViewInput.Columns.Count; i++)
{
DataControlFieldCell cell = gv.Rows[e.RowIndex].Cells[i] as DataControlFieldCell;
gv.Columns[i].ExtractValuesFromCell(e.NewValues, cell, DataControlRowState.Edit, true);
}
Hope this helps
Cheers
Al