如何在Gridview页脚中显示Colum Total(列值)的总和 [英] How to Show the Sum of Colum Total(Column Value) in Gridview Footer

查看:78
本文介绍了如何在Gridview页脚中显示Colum Total(列值)的总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Gridview页脚中显示Colum Total(列值)的总和。



这是我的GridView



How to Show the Sum of Colum Total(Column Value) in Gridview Footer.

This is my GridView

<pre lang="xml"><asp:GridView ID="DebtorsGridView" runat="server" AutoGenerateColumns="False"

BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"

CellPadding="3" Width="100%"

onselectedindexchanged="DebtorsGridView_SelectedIndexChanged">
<Columns> <asp:CommandField ShowSelectButton="True" />

                                                                 <asp:BoundField DataField="CusCode" HeaderText="CusCode" />
                                                                 <asp:BoundField DataField="CusName" HeaderText="CusName" />
<asp:BoundField DataField="NoofINV" HeaderText="INVNO"></asp:BoundField>
                                        <asp:BoundField DataField="Over 45" HeaderText="Over 45"

                                            DataFormatString="{0:N}" >
                                        <ItemStyle HorizontalAlign="Right" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="45 Day" HeaderText="45 Days"

                                            DataFormatString="{0:N}" >
                                        <ItemStyle HorizontalAlign="Right" />
                                        </asp:BoundField>
                                    <asp:BoundField DataField="30 Day" HeaderText="30 Days" HtmlEncode="False"

                                            DataFormatString="{0:N}">
                                        <ItemStyle HorizontalAlign="Right" />
                                        </asp:BoundField>
                                    <asp:BoundField DataField="15 Day" HeaderText="15 Days" DataFormatString="{0:N}" >
                                        <ItemStyle HorizontalAlign="Right" />
                                        </asp:BoundField>


                                </Columns>
                                <FooterStyle BackColor="White" ForeColor="#000066" />
                                <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                <RowStyle ForeColor="#000066" />
                                <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                <SortedAscendingHeaderStyle BackColor="#007DBB" />
                                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                <SortedDescendingHeaderStyle BackColor="#00547E" />



                            </asp:GridView>









任何人都可以帮助我谢谢。





Anyone can help Me Thank You.

推荐答案

看看这个 [ ^ ]示例。



-KR
Take a look at this[^] example.

-KR


通过演示查看此示例..

http://csharpdotnetfreak.blogspot.com/2009/07/ display-in-gridview-footer.html [ ^ ]
see this example with demo..
http://csharpdotnetfreak.blogspot.com/2009/07/display-total-in-gridview-footer.html[^]


这篇关于如何在Gridview页脚中显示Colum Total(列值)的总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆