开发者

How to set DataKeyNames for a complex type?

开发者 https://www.devze.com 2023-02-13 09:10 出处:网络
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.

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

精彩评论

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