Unable to bind LINQ to gridview

前端 未结 3 1671
隐瞒了意图╮
隐瞒了意图╮ 2021-01-28 00:43

I just using a simple LINQ query having group by clause and trying to bind its result set to GridView. My LINQ query looks like

var expData = from c in WebDB.Tra         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-28 01:20

    EDIT This ignores the "" in your linq statement

    Look at the attribute on your asp.net GridView(aspx code): DataKeyField="" is pointing to a column name that does not exist in your linq query

    
    

提交回复
热议问题