SfDataGrid.SelectedItems is a collection property. So, whenever the SelectedItems collection is changed, the property bound with SelectedItems does not get notified for this change. However, you can achieve this by creating an attached property for SelectedItems.
The following is an attached property created for SfDataGrid and the property value is updated based on SfDataGrid.SelectedItems.CollectionChanged event.
SfDataGrid’s SelectedItems values are set to the attached property by using SelectedItems.Collectionchanged event.
The following is the ViewModel property bound to the attached property that you created in the above code example.
Now, whenever the SelectedItems collection is changed the ViewModel property gets notified via the attached property.
This page will automatically be redirected to the sign-in page in 10 seconds.