Skip to content

Commit

Permalink
implement method
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller committed Sep 29, 2024
1 parent e689fde commit 778da77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Maui.DataGrid.Sample/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]}">
<dg:DataGrid.Columns>
<dg:DataGridColumn Title="Logo" PropertyName="Logo" SortingEnabled="False">
Expand Down
7 changes: 1 addition & 6 deletions Maui.DataGrid/DataGrid.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,6 @@ public bool FilteringEnabled
set => SetValue(FilteringEnabledProperty, value);
}


/// <summary>
/// Gets or sets the page number. Default value is 1.
/// </summary>
Expand Down Expand Up @@ -1328,11 +1327,7 @@ private ICollection<object> GetInternalItems(int lookupCount = 1)

#region Sorting methods

/// <summary>
/// TODO: Implement this method.
/// </summary>
/// <returns>Whether the DataGrid can be filtered</returns>
private bool CanFilter() => true;
private bool CanFilter() => FilteringEnabled && Columns.Any(c => c.FilteringEnabled);

private bool CanSort(SortData? sortData)
{
Expand Down

0 comments on commit 778da77

Please sign in to comment.