Click here to Skip to main content
15,885,998 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am facing a issue while assigning the DataKeyNames to a grid.

<
Sample - My Class objects:

Class Human
{
string Name;
}

Class Employee
{
Human human;
string EmpId;
}
>



VB
<asp:GridView runat="server" ID="grdInformation"
DataKeyNames="EmpId,human.Name" >


This assignment for Data Keyname throws error, is there any possiblity to assign from code behind as,

grdInformation.DataKeyNames = new string []{ ......what has to be done here... } 


Please edit if my question can be made better understandable.

Thanks in advance.

Let me know in case more infor required [In comments]
Posted
Updated 18-Feb-14 1:40am
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900