SfDataGrid provides two events for selection: SelectionChanging and SelectionChanged. It provides the added items and the removed items as arguments in it. You can pass the selected row info to a command in the ViewModel by using the Xamarin.Forms.Behaviors.
Refer the below code example in which a custom behavior for passing the selected row information to ViewModel is defined.
The below code illustrates the command and the call back implementation to get the selected row information.
The below code illustrates the behavior class implementation for the SfDataGrid.
This page will automatically be redirected to the sign-in page in 10 seconds.