GridView and Edit of current row

  • Thread starter Thread starter Bill Gower
  • Start date Start date
B

Bill Gower

I have a GridView with an edit button. When the user clicks 'Edit', I want
to display the information in a form and allow the user to edit the
information. I have a RowCommand event in which I take the data from the
row and update form controls. How do I know in the RowCommand what the
current row is? I tried GridView.Rows[EditIndex] but I get a -1 when I do
that.

ex.

DateOccured.Text =
TimeSheetGridView.Rows[TimeSheetGridView.EditIndex].Cells(4).Text;

Bill
 
Back
Top