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

DataFormatString and FooterText problem

5 Answers 255 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ernest Mombay
Top achievements
Rank 1
Ernest Mombay asked on 29 Nov 2010, 08:45 PM
Hello.

I've got a bit of problem. If I declare a column in a grid with a specific DataFormatString, then create an aggregate of it with FooterText, the text does not show up. So this code snippet below

<telerik:GridBoundColumn HeaderText="Column1" SortExpression="Column1"
                DataField="Column1" UniqueName="Column1" DataType="System.Decimal"
                DataFormatString="{0:$###,##0.00}" Aggregate="Sum" ItemStyle-Wrap="true" HeaderStyle-Wrap="false"
                FooterText="Total Column1: ">
                <ItemStyle HorizontalAlign="Right" Wrap="True" />
                <FooterStyle HorizontalAlign="Right" Wrap="True" />
            </telerik:GridBoundColumn>

would show the column with currency format but the will not show the right footer text. However, once I remove the DataFormatString setting, the footer text displays. However, I need to have the currency formatting in place. Is there a better way for me to do this, or are we not allowed to do this?

Thanks,
Ernest

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 29 Nov 2010, 10:09 PM
Hello Ernest,

I tried to reproduce this behavior on my end but unfortunately to no avail. Could you please check the attached project to see whether I'm not leaving out something important?

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ernest Mombay
Top achievements
Rank 1
answered on 29 Nov 2010, 10:31 PM
Hmm... I loaded your sample project, and it's still not showing the footer text. I expected the footer to say:

Total Column1: $999.99

But when I opened your project and linked our Telerik library, all I got was

$999.99

Maybe it's the version of Telerik we are using? I'm on v. 2010.2.929.35
0
Tomer
Top achievements
Rank 1
answered on 01 Dec 2010, 11:10 AM
Hi,
what was the solution if i may ask?
was it really a version problem? i have the same problem here.
0
Accepted
Daniel
Telerik team
answered on 02 Dec 2010, 10:02 AM
Hello Ernest and Tomer,

Sorry, I misunderstood the problem. When using DataFormatString and aggregates, you should specify the footer text in the FooterAggregateFormatString:
FooterAggregateFormatString="Total Column1: {0:$###,##0.00}"

Best regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Tomer
Top achievements
Rank 1
answered on 02 Dec 2010, 10:17 AM
Thanks.
Tags
Grid
Asked by
Ernest Mombay
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Ernest Mombay
Top achievements
Rank 1
Tomer
Top achievements
Rank 1
Share this question
or