The following syntax sets the rowindex equal to the specific row number:
int rowindex = ((GridViewRow)((Control)e.CommandSource).Parent.Parent).RowIndex;
The following syntax sets the rowindex equal to the specific row number:
int rowindex = ((GridViewRow)((Control)e.CommandSource).Parent.Parent).RowIndex;