【发布时间】:2016-08-05 10:24:17
【问题描述】:
我有一个网格视图,我想显示标题/空格,其中列标题为“AccountManager”(第 1 列)作为行之间的名称。如果名称不同,并且每个“AccountManager”上方的空间/标题中每个 accountmanager 的“Mins”、“Amount”和“Profit”列的总和。
这是我的 GridView(HTML):
<asp:gridview runat="server" id="GridView2" showfooter="true"
autogeneratecolumns="false" GridLines="None" CssClass="table"
HeaderStyle-CssClass="th" RowStyle-CssClass="td" Width="100%" OnRowDataBound="GridView2_RowDataBound" onrowcreated="GridView2_RowCreated">
<columns>
<asp:boundfield datafield="Date" headertext="Date"
footerstyle-font-bold="true" >
<FooterStyle Font-Bold="True"></FooterStyle>
</asp:boundfield>
<asp:boundfield datafield="AccountManager" headertext="AccountManager"
footerstyle-font-bold="true" >
<FooterStyle Font-Bold="True"></FooterStyle>
</asp:boundfield>
<asp:boundfield datafield="" headertext="Total" footerstyle-font-bold="true"
footertext="Grand Total:" >
<FooterStyle Font-Bold="True"></FooterStyle>
</asp:boundfield>
<asp:boundfield datafield="MIns" headertext="Mins"
footerstyle-font-bold="true" >
<FooterStyle Font-Bold="True"></FooterStyle>
</asp:boundfield>
<asp:boundfield datafield="Amount" headertext="Amount" footerstyle-font-bold="true"
>
<FooterStyle Font-Bold="True"></FooterStyle>
</asp:boundfield>
<asp:boundfield datafield="Profit" headertext="Profit"
footerstyle-font-bold="true">
<FooterStyle Font-Bold="True"></FooterStyle>
</asp:boundfield>
</columns>
<HeaderStyle BackColor="#CEFF99" ForeColor="Black" BorderColor="#C1FF80" BorderStyle="Solid"
BorderWidth="1px"></HeaderStyle>
<RowStyle CssClass="td"></RowStyle>
</asp:gridview>
请帮助...我遇到了麻烦。
【问题讨论】:
-
您是说您希望客户经理姓名显示一次,其余条目为空白,直到更改?
-
是的...正是...在标题中我只想显示一次客户经理姓名,直到它改变...以及他的“分钟”、“金额”和“利润”在哪里结束