When navigating to a details page from a sfdatagrid selecteditem and coming back to this page as you know that sfdatagrid view selecteditem will remain. This is a default behaviour also xamarin.forms listview.
Problem here is you can re-select the previously selecteditem If it was navigated back to this page. I thought that SingleDeselect Mode is perfect solution in this scenario. So I could click to "Deselect" and click again to "Reselect" but this doesnt work.
So my questions are is it intended to be like that or a bug? If either of them, now how can I refresh the selection. I tried 2 diffrent things.
1) SelectedItem=null;
RaisePropertyChanged("SelectedItem"); this doesnt work even in xaml SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
2)
private void dataGrid_GridTapped(object sender, GridTappedEventsArgs e)
{
listWorkouts.Opacity = 1.0;
listWorkouts.IsEnabled = true;
if((sender as SfDataGrid).SelectedItem !=null)
listWorkouts.SelectionController.ClearSelection();
}
this event is not getting fired when I tap on SelectedItem.
So what other option do I have?
PS, please make sure that we understand each other. I talk only about navigating back to the page.