Hi Helge,
Thanks for contacting Syncfusion Support.
We have checked the reported query “Selected Item deselects itself after data update when column sort is on” from our side. We would like to let you know that the SelectedItem deselects automatically when you do the refresh actions like changing itemssource, filtering is the behavior.
You can resolve the issue by maintain the SelectedItem before the action that you going to do and then update to datagrid.
public class SalesInfoViewModel : NotificationObject
{
private SalesByYear selectedItem;
public SalesByYear SelectedItem
{
get { return selectedItem; }
set
{
selectedItem = value;
this.RaisePropertyChanged("SelectedItem");
}
}
}
(this.DataContext as SalesInfoViewModel).SelectedItem = (sender as SfDataGrid).SelectedItem as SalesByYear;
|
Please let us know if you would require further assistance.
Regards,
Jayaleshwari N.