I haven't tried this, but I guess this should work.
Handle
RowCommand
event of the GriedView. Check if the
CommandName
is "select" (that's what you have named it).
If yes, you can get the selected row index using
CommandArgument
. Then perform the delete task.
Code will be something like this.
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Select")
{
int index = Convert.ToInt32(e.CommandArgument);
}
}
Let me know if it works or not.