summary calculation update

Hello,

I'm contacting you to understand a small problem I'm encountering with Group Summary. I downloaded your example, which can be found at the following link:

https://www.syncfusion.com/code-examples/how-to-update-the-table-summary-value-when-the-cell-in-edit-mode-in-wpf-data-grid

In this application, the summary calculation updates every time the column value changes, but this only works if the total is displayed on the screen. If you scroll and modify the content of a column, the calculation doesn't update, as shown in the attached video.

Is there a solution to this problem?

Sincerely.


Attachment: Group_Summary_51db1601.gif

3 Replies

SR Senthilkumar Ranganathan Syncfusion Team April 8, 2026 11:59 AM UTC

Hi Farid ADDA,

We have reviewed your query and the sample link provided. The reported scenario occurs because, when the summary row is not in view, it is not internally processed to update the values due to an architectural limitation.

To overcome this, you can use the SfDataGrid.View.RecordPropertyChanged event handler. When the value of a cell is changed, based on the row type, you can pass the summary row index to the UpdateDataRow method within the RecordPropertyChanged event handler, which updates the value in the summary row.

Code snippet to update the summary row:
sfDataGrid.Loaded += SfDataGrid_Loaded; private void SfDataGrid_Loaded(object sender, RoutedEventArgs e) {     if (sfDataGrid.View != null)         sfDataGrid.View.RecordPropertyChanged += View_RecordPropertyChanged; } private void View_RecordPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) {     if (sfDataGrid.View != null && sfDataGrid.View.SummaryRows.Count > 0)     {         var groupSummaryRows = this.sfDataGrid.RowGenerator.Items.Where(item => (item.RowType == RowType.SummaryCoveredRow || item.RowType == RowType.SummaryRow));         foreach (SpannedDataRow row in groupSummaryRows)             sfDataGrid.UpdateDataRow(row.RowIndex);     } }

Gif Illustration:
 
Note: Based on the summary you are using, you can check the row type in the RecordPropertyChanged event handler.

Please find the sample demo in the attachment.

Regards,
Senthilkumar Ranganathan.

Attachment: SfDataGridDemo_a2fd9c73.zip


FA Farid ADDA April 8, 2026 06:07 PM UTC

Thank you for your help; it's working perfectly now. Since I've had the opportunity to speak with you, please know that I greatly appreciate your products, which I use only for personal purposes.

Sincerely.



SR Senthilkumar Ranganathan Syncfusion Team April 9, 2026 05:23 AM UTC

Farid ADDA,
Glad that your requirement is fulfilled! We are closing this ticket now. Please open a new ticket if you need any assistance, we will be happy to help you.

Loader.
Up arrow icon