开发者

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">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜