I have a gridview like this.
try like this
protected void lnkDelete(Object sender, CommandEventArgs e) { int iStID=int32.Parse(e.CommandArgument.ToString()); } //iStID has the DataKey value which you can use.