This is a migrated thread and some comments may be shown as answers.

[Solved] Footer aggregation not displaying..

1 Answer 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Milan Gurung
Top achievements
Rank 1
Milan Gurung asked on 13 Jul 2009, 03:36 PM
Hi guys,
You should be able to help me out...

a. Data Bound to a grid and grid.showFooter = true is set.
b. During the grid pre-render event,
Following code is executed.

Dim gridRevisedCol As GridBoundColumn
        gridRevisedCol = grid.MasterTableView.GetColumn("Revised")
        gridRevisedCol.DataFormatString = "{0:#####}"
        gridRevisedCol.FooterText = "Total: "
        gridRevisedCol.FooterAggregateFormatString = "<strong>{0:###,###,##}</strong>"
        gridRevisedCol.Aggregate = GridAggregateFunction.Sum
        gridRevisedCol.Groupable = False
        gridRevisedCol.ItemStyle.HorizontalAlign = HorizontalAlign.Right
        gridRevisedCol.FooterStyle.HorizontalAlign = HorizontalAlign.Right


My question is what have I missed that I am not able to show the aggregate value in footer when the page loads.

It works though when it's grouped by dragging a column and ungrouped it. Amazing.


FYI..

  <telerik:RadGrid ID="grid" runat="server" Skin="Office2007" BorderWidth="0px"
    AutoGenerateColumns="true" PageSize="500" AllowPaging="True" AllowSorting="True">
        <AlternatingItemStyle BackColor="AliceBlue" Font-Names="Verdana" Font-Size="8pt" />
        <ItemStyle Font-Names="Verdana" Font-Size="8pt" />
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">
       </ClientSettings>
        <MasterTableView>
            <RowIndicatorColumn Visible="True">
            </RowIndicatorColumn>
        </MasterTableView>
        <FilterMenu EnableTheming="True" Skin="Web20">
            <CollapseAnimation Duration="200" Type="OutQuint" />
        </FilterMenu>
        <PagerStyle Position="TopAndBottom" />
    </telerik:RadGrid>



Please help me.

Thanks a lot.

Milan G


1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 16 Jul 2009, 12:27 PM
Hello Milan,

The best place for adding grid columns is the Page_Load or Page_Init events. Please review this help article for more details on dynamic grid structure creation and let me know if any questions arise.

Kind regards,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Milan Gurung
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or