RadGrid GridCalculated column aggregate - Sum is not supported for type "System.Object"

by ebarcza 10/10/2011 2:19:00 PM

When you try and aggregate a radgrid GridCalculatedColumn, you might encounter this error

Sum is not supported for type "System.Object"

 

 

to fix this error all you have to do is give the column a datatype - in my case it was  a decimal. the property setting for this is DataType="System.Decimal". See Example below:

<telerik:GridCalculatedColumn DataFields="SumOfNetRev,SumOfUESFee" DataType="System.Decimal"
                        FilterControlAltText="Filter NetTotal column" UniqueName="NetTotal"
                        DataFormatString="{0:c}"
                        Expression="{0}-{1}" HeaderText="Net Total" Aggregate="Sum" FooterAggregateFormatString="{0:c}">
                        <ItemStyle HorizontalAlign="right" />
                        <HeaderStyle HorizontalAlign="Right" />
                        <FooterStyle HorizontalAlign="Right" Font-Bold="true"/>
</telerik:GridCalculatedColumn>

Tags:

Telerik

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  July 2018  >>
MoTuWeThFrSaSu
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

View posts in large calendar

Recent comments

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2018

Sign in