diff --git a/Maui.DataGrid/DataGrid.xaml.cs b/Maui.DataGrid/DataGrid.xaml.cs index 68f1a55..569bbce 100644 --- a/Maui.DataGrid/DataGrid.xaml.cs +++ b/Maui.DataGrid/DataGrid.xaml.cs @@ -133,7 +133,7 @@ private bool CanSort(SortData? sortData) return true; } - private IList GetSortedItems(IList unsortedItems, SortData sortData) + private IEnumerable GetSortedItems(IList unsortedItems, SortData sortData) { var columnToSort = Columns[sortData.Index]; @@ -169,7 +169,7 @@ private IList GetSortedItems(IList unsortedItems, SortData sortD throw new NotImplementedException(); } - return items.ToList(); + return items; } #endregion Sorting methods @@ -222,7 +222,7 @@ private void SortAndPaginate(SortData? sortData = null) return; } - IList sortedItems; + IEnumerable sortedItems; if (sortData != null && CanSort(sortData)) {