I have a collection of custom objects that I bind to a SfDataGrid with a Multiple SelectionMode. In a delete button event I delete those selected objects in the collection and rebind it to the grid. However the grid doesn't update accordingly. I tried setting ItemsSource to null before but this causes a crash.
=== code to fill the grid
_List = datamodel.GetProducts(); _Grid = new SfDataGrid(this); _Grid.ItemsSource = list;
==== and in delete event
var selected = _Grid.SelectedItems.Cast<Product>().ToList(); foreach (var product in selected) _List.Remove(product); _Grid.ItemsSource = _List;
Is there an update method on the grid? Or am I missing something?
Kind regards, Michel.
P.S.: I put this thread in General because there is no SfDataGrid option in the Control dropdown.