Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
actually i created grid dyanamically all clumns are came from database .now i want to display sum of column values in footer labes

What I have tried:

ASP.NET
<asp:GridView ID="AIGrid" runat="server"
                                                      AutoGenerateColumns="False" PageSize="25"
                       AllowPaging="true" OnPageIndexChanging="OnAIGrid_PageIndexChanging" ShowFooter="true"  OnRowCreated ="AIGrid_RowCreated"
                   Font-Size="10pt" CssClass="grid" OnRowDataBound="AIGrid_RowDataBound">
                   <Columns>

                   </Columns>
                   </asp:GridView>

this is my aspx page and my cs page code is in below

C#
if (e.Row.RowType == DataControlRowType.Footer)
        {
            GridViewRow Footerrow = new GridViewRow(1, 0, DataControlRowType.Footer, DataControlRowState.Insert);
            Label  txtCountry = new Label();
        }
Posted

1 solution

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