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

[Solved] total in the footer with GridNumericColumn

4 Answers 312 Views
Grid
This is a migrated thread and some comments may be shown as answers.
newbie
Top achievements
Rank 1
newbie asked on 25 Jul 2008, 03:38 PM
I am using the Aggregate="Sum" property of the GridNumericColumn to display the sum of the column in the footer.
The total is displayed as 'Sum: x'
Is it possible to remove the word sum from the display?

4 Answers, 1 is accepted

Sort by
0
Suresh
Top achievements
Rank 1
answered on 25 Jul 2008, 04:05 PM
Hi,
 
you can set like,

 Aggregate="Sum"    FooterAggregateFormatString

="{0:N}"

hopes this helps

0
newbie
Top achievements
Rank 1
answered on 25 Jul 2008, 04:32 PM
that works.

Thanks!
0
Ron
Top achievements
Rank 1
answered on 17 Apr 2009, 06:05 PM
Hi I have a similar issue. I have the following code and my total line shows  custom: $800 I would like to see the FooterText as filled in.

Any help is apriciated.
Ron


 

 

<telerik:GridBoundColumn ColumnEditorID="TOTAAL" DataField="TOTAAL" HeaderText="Totaal" FooterText="Totaal te Factureren"

 

 

 

MaxLength="30" UniqueName="TOTAAL" DataType="System.Decimal" Aggregate="Sum"

 

 

 

DataFormatString="{0:c}" FooterAggregateFormatString="{0:c}" >

 

 

 

<FooterStyle Font-Bold="True" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"

 

 

 

Font-Underline="False" HorizontalAlign="Right" Wrap="True" Width="75px" />

 

 

 

<HeaderStyle Wrap="True" Width="75px" Font-Bold="True" Font-Italic="False" Font-Overline="False"

 

 

 

Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Right" />

 

 

 

<ItemStyle Width="75px" Font-Bold="False" Font-Italic="False" Font-Overline="False"

 

 

 

Font-Strikeout="False" Font-Underline="False" HorizontalAlign="Right" Wrap="True" />

 

 

 

</telerik:GridBoundColumn>

 

0
Princy
Top achievements
Rank 2
answered on 20 Apr 2009, 05:35 AM
Hello Ron,

You can try out the following code to set a custom footer text along with the aggregate value for a column:
c#:
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridFooterItem) 
        { 
            GridFooterItem footer = (GridFooterItem)e.Item; 
            string strTotal = footer["TOTAAL"].Text; 
            footer["TOTAAL"].Text = "Totaal te Factureren :" + strTotal; 
        }  
    } 

Thanks
Princy.
Tags
Grid
Asked by
newbie
Top achievements
Rank 1
Answers by
Suresh
Top achievements
Rank 1
newbie
Top achievements
Rank 1
Ron
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or