The sum of the indexer property
It is necessary to get the sum of the indexer property column. When uploading, the amount is calculated, but if you change the value or add it, the amount does not change. Is it possible to update the sum row for such properties?
Attachment: WpfApp1_94daf42d.zip
SIGN IN To post a reply.
1 Reply
1 reply marked as answer
GS
Gowthamabalaji Sambath
Syncfusion Team
July 21, 2026 12:59 PM UTC
Hi Sergio Teplyashin,
We have reviewed your query. Based on your requirement, the summary value can be updated dynamically when a value is edited, or a new row is added by implementing the INotifyPropertyChanged interface in the model class and setting the DataGrid's LiveDataUpdateMode property to AllowDataShapping.
Please refer to the code snippet below:
<syncfusion:SfDataGrid ItemsSource="{Binding Operations}" AllowEditing="True" LiveDataUpdateMode="AllowDataShaping" Columns="{Binding GridColumns}" Grid.Row="1"> |
| public class EmployeeInfo : INotifyPropertyChanged
{
private int _value;
public string Key { get; set; }
public int Value
{
get => _value;
set
{
if (_value != value)
{
_value = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Value))); } } } public event PropertyChangedEventHandler? PropertyChanged; } public class OperationInfo : INotifyPropertyChanged { public EmployeeInfoCollection Employees { get; } = []; public OperationInfo() { Employees.CollectionChanged += Employees_CollectionChanged; } private void Employees_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e) { if (e.NewItems != null) { foreach (EmployeeInfo employee in e.NewItems) { employee.PropertyChanged += Employee_PropertyChanged; RaiseEmployeeProperty(employee.Key); } } if (e.OldItems != null) { foreach (EmployeeInfo employee in e.OldItems) { employee.PropertyChanged -= Employee_PropertyChanged; } } } private void Employee_PropertyChanged(object? sender, PropertyChangedEventArgs e) { if (sender is EmployeeInfo employee && e.PropertyName == nameof(EmployeeInfo.Value)) { RaiseEmployeeProperty(employee.Key); } } private void RaiseEmployeeProperty(string key) { PropertyChanged?.Invoke( this, new PropertyChangedEventArgs($"Employees[{key}].Value")); } public event PropertyChangedEventHandler? PropertyChanged; } |
GIF Illustration:
Please find the sample demo in the attachment.
Regards,
Gowthamabalaji Sambath.
Attachment: WpfApp_11417c5e.zip
Marked as answer
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
- Marked answer
-
ST Sergio Teplyashin
- Jul 18, 2026 02:31 PM UTC
- Jul 21, 2026 12:59 PM UTC