From 778da77c8eeaa7e8adb29c4ccd73ad545d21123e Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Sat, 28 Sep 2024 21:00:31 -0500 Subject: [PATCH] implement method --- Maui.DataGrid.Sample/MainPage.xaml | 2 +- Maui.DataGrid/DataGrid.xaml.cs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Maui.DataGrid.Sample/MainPage.xaml b/Maui.DataGrid.Sample/MainPage.xaml index 40e9d48..bbfe2ae 100644 --- a/Maui.DataGrid.Sample/MainPage.xaml +++ b/Maui.DataGrid.Sample/MainPage.xaml @@ -24,7 +24,7 @@ FooterBackground="{StaticResource GridFooterBgColor}" SortedColumnIndex="1" PaginationEnabled="{Binding PaginationEnabled}" PageSize="{Binding PageSize}" PullToRefreshCommand="{Binding Commands[Refresh]}" IsRefreshing="{Binding IsRefreshing}" - RowHeight="70" HeaderHeight="50" x:Name="_dataGrid1" + RowHeight="70" HeaderHeight="75" x:Name="_dataGrid1" RowTappedCommand="{Binding Commands[Tapped]}"> diff --git a/Maui.DataGrid/DataGrid.xaml.cs b/Maui.DataGrid/DataGrid.xaml.cs index 941e45e..8e9cf05 100644 --- a/Maui.DataGrid/DataGrid.xaml.cs +++ b/Maui.DataGrid/DataGrid.xaml.cs @@ -955,7 +955,6 @@ public bool FilteringEnabled set => SetValue(FilteringEnabledProperty, value); } - /// /// Gets or sets the page number. Default value is 1. /// @@ -1328,11 +1327,7 @@ private ICollection GetInternalItems(int lookupCount = 1) #region Sorting methods - /// - /// TODO: Implement this method. - /// - /// Whether the DataGrid can be filtered - private bool CanFilter() => true; + private bool CanFilter() => FilteringEnabled && Columns.Any(c => c.FilteringEnabled); private bool CanSort(SortData? sortData) {