GrideviewName.DataKeyNames = new string[] { "pid", "catId" };
OR
mension datakeys in the source code like in the Gridtag
asp:gridview DataKeyNames=pid,catId
In the above we are given datakeys names pid,catId
Get Datakeys values(pid,catId):
GridviewName.DataKeys[e.RowIndex].Values["Pid"]);
GridviewName.DataKeys[e.RowIndex].Values["catId"]);
No comments:
Post a Comment