"Justin" <Ju****@discuss ions.microsoft. com> wrote in message
news:57******** *************** ***********@mic rosoft.com...
How do I find the index number of a row inorder to update it?
If you're talking about the <asp:DataGrid > control, when you switch it into
Edit mode the row that you're currently editing is available through the
Item property of the DataGridCommand EventArgs parameter of the Edit method.
You can refer to each of the columns in that row by the Item property's
Cells collection. E.g. if you stored the dataset's primary key as a hidden
column in the datagrid, you could access it like this (for C#):
public void dgrd<DataGridNa me>_Edit(object sender, DataGridCommand EventArgs
e)
{
int intPrimaryKey = Convert.ToInt32 (e.Item.Cells[0].Text);
}