On gridview editing event I have :
string name = GridView1.Rows[e.NewEditIndex].Cells[1].Text;
string subname = GridView1.Rows[e.NewEditIndex].Cells[2].Text;
I want to get those values from variables in row updating event gridview but I don’t know how to access them.
thanks
Use the
RowIndexpropertyTo get the old/new values of an updating row, you can also use the
GridViewUpdateEventArgs.OldValuesandGridViewUpdateEventArgs.NewValuesDictionaries.To detect only the changed values
(not tested):or with LINQ:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowupdating.aspx