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

Aggregates not working on collection of an interface

1 Answer 54 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Karl Farrand
Top achievements
Rank 1
Karl Farrand asked on 02 Apr 2013, 10:38 PM
Hi,

Some time ago I had an issue where I was binding to a CollectionSourceView that was an ObservableCollection<I>
ie (ObservableCollection<IBenefit> where IBenefit could be the following types
a) Benefit
b) BenefitMotorVehicle (which inherits from Benefit, but extends it's functionality and overrides certain properties, Including Excl GST and Incl GST)


Link to original issue
http://www.telerik.com/community/forums/silverlight/gridview/binding-radgridview-to-collectionviewsource.aspx#1792736

This issue was resolved when I used a newer version of the RadGridView, now all items show in grid.

However the aggregation of these numbers does not seem to be working correctly.
Scenario 1 - Only items of type BenefitMotorVehciles are in the list, totals work fine.
Scenario 2 - I have mixed items of type Benefit and BenefitMotorVehicle, the aggregate only totals those objects of type Benefit

See screenshot attached

I am using v2013 Q1 and binding using MVVM

Is there a way I can get all the items totalling?

Cheers

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 Apr 2013, 01:10 PM
Hello,

I have tested such a scenario setting an ItemsSource as described in Scenario 2. Still, the SumFunction calculated the aggregate result right.

Would it be possible for you to isolate the issue in a sample project and send it to us?
 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Karl Farrand
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or