Possible Duplicate:
Unable to bind LINQ to gridview無法綁定LINQ
我只是用具有組簡單的LINQ查詢by子句,並試圖將其結果設置爲GridView控件綁定到GridView控件。我的LINQ查詢看起來像ASP.NET頁面
<asp:GridView ID="GridView1" AutoGenerateColumns="true" runat="server" DataKeyField="Key" />
但得到的錯誤上
var expData = from c in WebDB.TblTrans
group c by c.transdate into g
select g;
網格視圖:
A field or property with the name 'Key' was not found on the selected data source.
任何人都可以幫我嗎?
種類,他至少刪除了查詢中的引號! – Jimmy 2011-05-17 14:31:30
http://meta.stackexchange.com/questions/16721/how-does-accept-rate-work – 2011-05-17 15:14:58