Click here to Skip to main content
15,998,694 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
How to Show the Sum of Colum Total(Column Value) in Gridview Footer.

This is my GridView

ASP.NET
<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.
Posted
Updated 17-Feb-14 19:54pm
v2

 
Share this answer
 
Take a look at this[^] example.

-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900