[PR #185] Support custom filtering #2056

Closed
opened 2026-01-29 18:16:56 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/radzenhq/radzen-blazor/pull/185

State: closed
Merged: No


This PR adds following:

  • ability to filter data with custom rules by assigning the RadzenDataGridColumn.CustomFiltering function in Client-side mode.
  • disabling unnecessary filtering/sorting operations in RadzenDataGrid.View in Server-side mode.
  • added related tests,
    • DataGrid_View_Use_ClientSide_Filtering_When_LoadData_Empty
    • DataGrid_View_Use_ServerSide_Filtering_When_LoadData_Used
    • DataGrid_View_Use_Custom_Filtering

RadzenDataGridColumn custom filtering:

    [Parameter]
    public Func<CustomFilteringArgs<TItem>, bool> CustomFiltering { get; set; } = null;
    public class CustomFilteringArgs<T>
    {
        public Blazor.RadzenDataGridColumn<T> Column { get; internal set; }
        public T Data { get; internal set; }
    }

Trigger to this PR was the System.Linq.Dynamic.Core.Exceptions.ParseException that was thrown when trying to use RadzenDataGrid.View in event LoadData and active filter FilterOperator.Contains in a column with composite data, for example, an array of objects with fields [int Id], [string Name]

**Original Pull Request:** https://github.com/radzenhq/radzen-blazor/pull/185 **State:** closed **Merged:** No --- This PR adds following: - ability to filter data with custom rules by assigning the RadzenDataGridColumn.CustomFiltering function in Client-side mode. - disabling unnecessary filtering/sorting operations in RadzenDataGrid.View in Server-side mode. - added related tests, - DataGrid_View_Use_ClientSide_Filtering_When_LoadData_Empty - DataGrid_View_Use_ServerSide_Filtering_When_LoadData_Used - DataGrid_View_Use_Custom_Filtering RadzenDataGridColumn custom filtering: ```cs [Parameter] public Func<CustomFilteringArgs<TItem>, bool> CustomFiltering { get; set; } = null; ``` ```cs public class CustomFilteringArgs<T> { public Blazor.RadzenDataGridColumn<T> Column { get; internal set; } public T Data { get; internal set; } } ``` Trigger to this PR was the System.Linq.Dynamic.Core.Exceptions.ParseException that was thrown when trying to use RadzenDataGrid.View in event LoadData and active filter FilterOperator.Contains in a column with composite data, for example, an array of objects with fields [int Id], [string Name]
claunia added the pull-request label 2026-01-29 18:16:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2056