我有一个分组 LINQ 查询,其中包含我绑定到 gridview 的计数摘要行,但 gridview 中的计数字段仅显示“System.Data.DataRow []”
我在这里做错了什么?谢谢!
aspx:
<asp:BoundField DataField="Service_Name" HeaderText="Impacted services"/>
<asp:BoundField DataField="Fieldname" HeaderText="Count"/>
VB代码:
Dim Services = From Lines In dtMain _
Where Lines.Field(Of String)("ULTIMATE_PARENT_NAME") = lstUPs.SelectedItem.ToString _
Group By Parent_Name = Lines.Field(Of String)("ULTIMATE_PARENT_NAME"), _
Service_Name = Lines.Field(Of String)("THIRD_PARTY_SERVICE_CLEAN") _
Into Fieldname = Group, Count()
grdOuterGridView.DataSource = Services
grdOuterGridView.DataBind()