Opening filter menu crashes the app in Blazor DataGrid

I’m using the Syncfusion Blazor DataGrid with Excel-style filtering enabled. My grid is populated with data, and the filter menu shows the filter choices. However, when I select a filter value (e.g., "DOM LSE") that is clearly present in the data the grid returns no rows.

filtering-issue-1.png

No rows:

After this, when I try to open the filter menu again, the app crashes with the following error:

```

fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]

      Unhandled exception in circuit '9WN8rBWvua2vXwhBF_js75B39U78A1SNPegJovxPUiA'.

      System.ArgumentNullException: Value cannot be null. (Parameter 'type')

         at System.ArgumentNullException.Throw(String paramName)

         at System.Linq.Expressions.Expression.Parameter(Type type, String name)

         at Syncfusion.Blazor.Data.QueryableExtensions.Parameter(Type sourceType)

         at Syncfusion.Blazor.Data.EnumerableOperation.PerformFiltering(IEnumerable dataSource, List`1 whereFilter, String condition)

         at Syncfusion.Blazor.DataOperations.PerformFiltering(IEnumerable dataSource, List`1 whereFilter, String condition)

         at Syncfusion.Blazor.Data.BlazorAdaptor.DataOperationInvoke[T](IEnumerable DataSource, DataManagerRequest queries)

         at Syncfusion.Blazor.Data.BlazorAdaptor.PerformDataOperation[T](Object queries)

         at Syncfusion.Blazor.DataManager.ExecuteQuery[T](DataManagerRequest queries)

         at Syncfusion.Blazor.DataManager.ExecuteQuery[T](Query query)

         at Syncfusion.Blazor.Grids.Internal.FilterCheckBoxRenderer`1.UpdateDataSource(Boolean isInputSearch, IEnumerable`1 customFilterData, Int32 filterChoiceCount)

         at Syncfusion.Blazor.Grids.Internal.FilterCheckBoxRenderer`1.OpenFilterDialog(String XPosition, String YPosition)

         at Syncfusion.Blazor.Grids.Internal.FilterCheckBoxRenderer`1.DialogCreated()

         at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)

         at Syncfusion.Blazor.Popups.SfDialog.OnAfterScriptRendered()

         at Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender)

         at Syncfusion.Blazor.Popups.SfDialog.OnAfterRenderAsync(Boolean firstRender)

         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

```

App Crash screenshot: filteringissue3_10524b88.png


- The data is present and non-null for the filtered field.

- This happens after filtering returns an empty grid.

- I tried to reproduce it in a minimal repro, but I couldn't reproduce it: https://blazorplayground.syncfusion.com/LjreZcstbTwWBSAo


Could you please help me how to locate and fix this issue? I've been battling this all day today.

I'd greatly appreciate your help!


2 Replies 1 reply marked as answer

AK Ashish Khanal July 11, 2025 11:35 PM UTC

I found the issue and fixed it.


It crashes if you use  IEnumerable for grid data.

    // Don't do this:
    private IEnumerable<GridRowViewModel> gridData = new();

I fixed this by simply using:
    // Do this:
    private List<GridRowViewModel> gridData = new();


Marked as answer

SK Sanjay Kumar Suresh Syncfusion Team July 14, 2025 08:22 AM UTC

Hi Ashish Khanal,


We're glad to hear that you've resolved the issue on your end.


We also attempted to reproduce the reported issue from our side but were unable to replicate it successfully. If your use case still requires using IEnumerable<Tvalue> , kindly share a sample that replicates the issue from your environment. This will help us investigate further and assist you more effectively.


Sample Ensured from our End:

https://blazorplayground.syncfusion.com/embed/BDVeDGWTBaQrrPSC?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5


Regards,

Sanjay Kumar Suresh


Loader.
Up arrow icon