You can have a
CommandName
property specified for the
ImageButton
.
Also declare
CommandArgument
property like...
CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
Then inside the
RowCommand
Event, check the
CommandName
and get the details of the Row like...
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow row = ProductsGridView.Rows[index];
Complete example at -
GridView.RowCommand Event[
^]