Aggregates are not updated

PROBLEM

When a value is modified in code, the aggregate results are not updated.

CAUSE

The reason for this behavior is that a CollectionChanged event of the bound source collection is not raised.

SOLUTION

In order to get the aggregate results refreshed, you have to notify the GridView that the bound collection has been changed. A CollectionChanged notification of the bound collection should be raised.

There are four possible solutions:

  1. You can update the value as illustrated in this help article on how to edit an item outside RadGridView.

  2. Ensure that a CollectionChanged event is raised from the bound source collection.

  3. Invoke RadGridView.CalculateAggregates() method.

  4. Invoke RadGridView.Rebind() method. It will raise CollectionChanged notification with action Reset. Please note that the entire view will be recreated.

Column group aggregates

PROBLEM

When a value is modified in code, the aggregate results in the group rows are not updated.

CAUSE

The reason for this behavior is that a CollectionChanged event of the bound source collection is not raised.

SOLUTION

In order to get the group aggregates refreshed, a CollectionChanged notification of the bound collection should be raised.

There are four possible solutions:

  1. You can update the value as illustrated in this help article on how to edit an item outside RadGridView.

  2. Ensure that a CollectionChanged event is raised from the row in the bound source collection that has a change applied for.

  3. Invoke RadGridView.GroupDescriptors.Reset(). This action will reset all the group rows.

  4. Invoke RadGridView.Rebind() method. It will raise CollectionChanged event with action Reset. Please note that the entire view will be recreated.

In this article