To set more than one DataKeys in grid view,
<asp:GridView ID="grdView" runat="server" DataKeyNames="Name,Email">
To get the Value of the DataKey
DataKey myData = grdView.DataKeys[RowIndex++];
myData.Values["StarRate"];
OR
String value = grdView.DataKeys[RowIndex++].Values["StarRate"];
No comments:
Post a Comment