Client Side
----------------
<asp:GridView ID="grdCreateEdit" runat="server" DataKeyNames="ParameterId">
</asp:GridView>
Server Side
----------------
int parameterId=0;
foreach (GridViewRow grdRow in grdCreateEdit.Rows)
{
int.TryParse(grdCreateEdit.DataKeys[grdRow.RowIndex].Values[0].ToString(), out parameterId);
}