Set the Command Name for Link Button as "OpenDoc".
I assume that the document path you are saving in ItemTemplate of the gridview as a label with id "lblDocPath".
On GridView Command Event add this below code.
Label docPath = (Label)((sender as LinkButton).Parent.FindControl("lblDocPath"));
hope it works