Kurt Schroeder shares this gem to show how to find a given control ID in a GridViewRow:
public static int GetCellPosition(GridViewRow gvr, string ctrlID)
{
for (int i = 0; i < gvr.Cells.Count; i++)
{
foreach (Control c in gvr.Cells[i].Controls)
{
if (c.ID == ctrlID)
return i;
}
}
return -1;
}