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

Can not get sum to appear in footer

1 Answer 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve LaForge
Top achievements
Rank 1
Steve LaForge asked on 19 Jan 2009, 06:16 PM
I have a grid that returns the following records, and I am trying to show the total #l logons in the footer.  However, all I get is the footer text, without the summed value.  I have tried various combinations with using footertext and footeraggregateformatstring without any better results.

January, 2009  51
December, 2008  93
July, 2008  33
June, 2008  4
March, 2008  9
February, 2008  46
January, 2008  44
December, 2007  45
November, 2007  70
October, 2007  111
September, 2007  104
August, 2007  33
July, 2007  4

My grid definition looks like:

 
<telerik:RadGrid ID="gridSummary" runat="server" AutoGenerateColumns="False"   
        GridLines="None" ShowFooter="True" Skin="WebBlue" Width="300px">  
        <HeaderContextMenu EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200">  
            </CollapseAnimation> 
        </HeaderContextMenu> 
        <HeaderStyle Width="150px" /> 
        <MasterTableView> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridHyperLinkColumn DataNavigateUrlFields="yr,mo"   
                    DataNavigateUrlFormatString="usagedata.aspx?typ=detail&amp;yr={0}&amp;mo={1}"   
                    DataTextField="periodname" UniqueName="period">  
                    <HeaderStyle HorizontalAlign="Right" /> 
                    <ItemStyle HorizontalAlign="Right" /> 
                </telerik:GridHyperLinkColumn> 
                <telerik:GridNumericColumn DataField="logons" Aggregate="Sum" 
                    FooterAggregateFormatString="{0} total logons" HeaderText="# of Logons"   
                    NumericType="Number" UniqueName="logons1">  
                </telerik:GridNumericColumn> 
            </Columns> 
        </MasterTableView> 
        <FilterMenu EnableTheming="True">  
            <CollapseAnimation Type="OutQuint" Duration="200">  
            </CollapseAnimation> 
        </FilterMenu> 
    </telerik:RadGrid> 

 


Thanks!
Steve

1 Answer, 1 is accepted

Sort by
0
Steve LaForge
Top achievements
Rank 1
answered on 19 Jan 2009, 10:03 PM
I resolved the issue by changing my data source from a SQL data reader to a datatable.
Tags
Grid
Asked by
Steve LaForge
Top achievements
Rank 1
Answers by
Steve LaForge
Top achievements
Rank 1
Share this question
or