hi try this:
in gridview property double click the event selectedIndexChanged,
protected void grvItems_SelectedIndexChanged(object sender, EventArgs e)
{
txtID.Text = grvItems.SelectedRow.Cells[1].Text;
}
hope it helps,
mark this as answer if it helps you
thanks!