From e930e6b05269d16aaa26fe212c4fcbe39c2c6750 Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Thu, 25 Jan 2024 13:54:14 -0600 Subject: [PATCH] avoid null reference --- Maui.DataGrid/DataGrid.xaml.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Maui.DataGrid/DataGrid.xaml.cs b/Maui.DataGrid/DataGrid.xaml.cs index 11fe580..ad5b619 100644 --- a/Maui.DataGrid/DataGrid.xaml.cs +++ b/Maui.DataGrid/DataGrid.xaml.cs @@ -617,7 +617,10 @@ private void SortAndPaginate(SortData? sortData = null) break; } - self._collectionView.SelectionMode = n; + if (self._collectionView != null) + { + self._collectionView.SelectionMode = n; + } }); ///