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

"SUM: " added to sum values in grid footer

2 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 04 Jun 2012, 08:30 AM
Hello,

Im trying to get the sums shown in the footer of my grid. Works fine but when doing it using the aggregate functions it adds the text "SUM: " infront of the number.

How do i remove this?

Code im using to set the footer sums

protected void RadGrid_Months_DataBound(object sender, EventArgs e)
{
    foreach (GridBoundColumn col in RadGrid_Months.MasterTableView.AutoGeneratedColumns)
    {
        if(col.UniqueName != "Namn")
            col.Aggregate = GridAggregateFunction.Sum;
    }
}

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 Jun 2012, 09:07 AM
Hello Robert,

Try setting FooterAggregateFormatString for the column.

C#:
col.FooterAggregateFormatString = "{0:D}";

Thanks,
Shinu.
0
Robert
Top achievements
Rank 1
answered on 04 Jun 2012, 10:38 AM
I got it sorted :) Thank you
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Robert
Top achievements
Rank 1
Share this question
or