Add following as column to your grid view





Write following code on rowcommand event

HyperLink hyp = (HyperLink)Gridview1.Rows[Gridview1Row.RowIndex].Cells[columnEmployeeIndex].Controls[0];
emp = string.IsNullOrWhiteSpace(hyp.Text) ? 0 : Convert.ToInt32(hyp.Text);

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/NxJVM6tw4uk/14579