How to set DataKeyNames for a complex type?
My Dat开发者_开发技巧aSource is a list of
new { Product = p, Category = c }
I want to set the DataKeyNames to Product.ID
, but it says the property doesn't exists.
ID="grid" runat="server" DataKeyNames="Product.ID">
How can I bind it?
can you put the datakeynames with the complete namespace.
ID="grid" runat="server" DataKeyNames="yourNameSpace.Product.ID">
精彩评论