|
@@ -127,6 +127,7 @@ public partial class AvaloniaDataGrid : UserControl, INotifyPropertyChanged
|
|
|
grid.Grid.CollectionView.CollectionChanged -= grid.CollectionView_CollectionChanged;
|
|
|
grid.Grid.CollectionView.CollectionChanged += grid.CollectionView_CollectionChanged;
|
|
|
}
|
|
|
+ grid.ItemsChanged();
|
|
|
grid.UpdateSummaryRow();
|
|
|
}
|
|
|
|
|
@@ -141,6 +142,11 @@ public partial class AvaloniaDataGrid : UserControl, INotifyPropertyChanged
|
|
|
}
|
|
|
|
|
|
private void CollectionView_CollectionChanged(object? sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
|
|
+ {
|
|
|
+ ItemsChanged();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void ItemsChanged()
|
|
|
{
|
|
|
ItemCount = (Grid.CollectionView as DataGridCollectionView)?.ItemCount ?? 0;
|
|
|
}
|