Hi
Follow the below one, If you are using GridView_RowCommand:
GridViewRow gRow = (GridViewRow)(((ImageButton)e.CommandSource).NamingContainer);
int RowIndex = gRow .RowIndex;
Use the row index and get the selected row id and delete the record.
Click on Delete boutton and it is inside item template:
GridViewRow gRow = (GridViewRow)((ImageButton)(sender)).NamingContainer;
string strId = ((HiddenField)gRow.FindControl("hdnId")).Value;
use the strId and delete.
Regards
Wills