New to Telerik UI for Blazor? Download free 30-day trial

Null Reference when using filtering in Grid with data coming from a server


Product Grid for Blazor


For our current project, we are grabbing data from the server and using it to dynamically populate a TelerikGrid in Blazor. This is causing an issue with filtering in the Grid.

Error Message

System.NullReferenceException: Object reference not set to an instance of an object.
    at Telerik.Blazor.Components.Common.Filters.FilterList.TelerikFilterList.GetFilterOperators()
    at Telerik.Blazor.Components.Common.Filters.FilterList.TelerikFilterList.InitFilterOperators()
    at Telerik.Blazor.Components.Common.Filters.FilterList.TelerikFilterList.OnInitializedAsync()
    at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

Possible Cause

The possible reason for this error is a missing FieldType from the column that you try to filter.


The FieldType is required when the Grid can't get its columns type through reflection - when the Grid is bound to an object rather than a real model.

The following sample project in the blazor-ui repository demonstrates an example of filtering in Grid with data coming from a server.

Additional useful information can be found at our Grid data binding documentation in the following link.

In this article