I'm trying to change the selected item background color, but when I tapped on an item the grid throw an exception.
GridSelectionController
public CustomSelectionController(SfDataGrid datagrid)
{
this.DataGrid = datagrid;
}
public override Color GetSelectionColor(int rowIndex, object rowData)
{
return Color.FromHex("#F89829");
}
I'm binding it like this:
dataGridVersus.SelectionController = new CustomSelectionController(dataGridVersus);
SelectionMode = SelectionMode.Multiple;
The exception:
Object reference not set to an instance of an object.
at Syncfusion.SfDataGrid.XForms.GridSelectionController.ProcessingPointerTouchUp(RowColumnIndex rowColumnIndex)
at Syncfusion.SfDataGrid.XForms.GridSelectionController.HandlePointerOperation(GridPointerEventArgs args, RowColumnIndex rowColumnIndex)
at Syncfusion.SfDataGrid.XForms.DataColumnBase.RaisePointerTouchUp()
at Syncfusion.SfDataGrid.XForms.UWP.GridCellBaseRenderer.OnTapped(Object sender, TappedRoutedEventArgs e)
at Windows.ApplicationModel.Core.UnhandledError.Propagate()