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

Aggregate column footers don't sum on data change Caliburn Micro MVVM

3 Answers 249 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pete
Top achievements
Rank 1
Pete asked on 01 Jun 2011, 05:14 PM
I can't post any code at the moment but I have a standard radgridview on my view which presents data from an entity framework entity.  I have GridViewDataColumns for all but one column which is an expression column. On load the column footer totals show the correct value, i.e. the GridViewDataColumn.AggregateFunction sumfunction routine appears to run in all but the expression column. I have two issues:

  1. when I change any value in the grid the column footers are not updated. They do total across and upate their respective row total cell (which is my expression column). And all have the appropriate aggregate function tdefined in the xaml for the type of grid column.
  2. the expression column total (value in the footer) is never updated at any time and that includes on initial load. It always shows '0'.

My implementation is WPF - MVVM using Caliburn Micro framework.

Since I can't post any code at the moment (it's on another computer) I'm looking for suggestions as to what could be the issue so anyone and everyone, please chime in!

I have tried invoking the CalculateAggregates function in the code behind in the CellEditEnding event and it is invoked but still no upates occur.

Any and all assistance, suggestions are greatly appreciated.

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 03 Jun 2011, 02:13 PM
Hello Peter,

 I have created a sample project trying to reproduce the behavior that you are facing. I have created a GridViewDataColumn with a footer aggregate and a GridViewExpressionColumn with a generic aggregate. It is all working as expected, all the footers are updated when the data value in the column  is changed.
I was not able to get the two points that you have described.

Generally the expression columns work only with generic aggregate functions. You may find additional information about Expression column aggregate in this forum post.

I am attaching the sample project, would you please review it and specify how your implementation defers from the this one? It would be even more helpful if you could change this project so that the problems that you have are reproduced.

Regards,
Didie
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Pete
Top achievements
Rank 1
answered on 03 Jun 2011, 05:53 PM
Didi;

Thanks for your efforts. I'll get back to you with code etc. as soon as possible.
0
Pete
Top achievements
Rank 1
answered on 05 Jun 2011, 03:20 PM
Turns out my issue was I was using the wrong collection type on my view model property. I defaulted to ObjectSet since I was binding to EF entity but when I changed to Caliburn's BindableCollection type it fixed my issue. I assume using ObservableCollection would have been fine too.

Thank you for your assistance Didi.
Tags
GridView
Asked by
Pete
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Pete
Top achievements
Rank 1
Share this question
or