我正在使用这个查询:
select EmployeeId, receptionist_name, date_of_sale,
count(date_of_sale)
from FrontOffice
group By EmployeeId, receptionist_name, date_of_sale
order by date_of_sale
用于填充网格视图。但我可以绑定EmployeeId
, receptionist_name
, date_of_sale
, 所以你能告诉我如何在网格视图中绑定第 4 列以及如何填充网格视图。
更新:这是我正在使用的代码:
<Columns>
<asp:BoundField HeaderText="Date" DataField="date_of_sale" />
<asp:BoundField HeaderText="Employe Id" DataField="EmployeeId" />
<asp:BoundField HeaderText="Receiptist Name" DataField="receptionist_name" />
<asp:TemplateField HeaderText="No. of Prospectus Sale">
<ItemTemplate>
<asp:Label ID="salecount" runat="server"
Text='<%# Eval("SaleCount") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>