Bad practice always.
You can find the rowindex always in your
GridView RowCommand
event.
Try this:
GridViewRow gvr = (GridViewRow)(((ImageButton)e.CommandSource).NamingContainer);
int RowIndex = gvr.RowIndex;
Now you can delete the row using
RemoveAt
function. You need to pass
Index
as this
RowIndex
.
--Amit