I need to access the item that is being edited from the updating event of a SqlDataSource. Currently, I am able to access the item by using the following code.
Is there a method similar to GetInsertItem() that I can use to get the edited item or do I have to loop through the collection to get the item?
protected
void
SqlDataSource1_Updating(
object
sender, SqlDataSourceCommandEventArgs e)
{
foreach
(GridItem item
in
rgvResult.MasterTableView.Items)
{
if
(item.Edit)
{
GridEditFormItem editItem = (GridEditFormItem)rgvResult.MasterTableView.GetItems(GridItemType.EditFormItem)[item.ItemIndex];
//do stuff
}
}
}
Is there a method similar to GetInsertItem() that I can use to get the edited item or do I have to loop through the collection to get the item?