I think you can get it in grid view selected index event:
void GridView1_SelectedIndexChanged(Object sender, EventArgs e)
{
int index = CustomersGridView.SelectedIndex;
Message.Text = "The primary key value of the selected row is " +
CustomersGridView.DataKeys[index].Value.ToString() + ".";
}
If you want to display the popup on select row then you can read this article
http://www.aspdotnetcodes.com/Ajax_ModalPopup_PostBack_GridView.aspx[
^]