Why does filter fetch result from the first 1000 records in Blazor DataGrid?

Answer:

In Excel/CheckBox type filter by default, the filter choice record count is limited to 1000 that it takes first 1000 records and then applies the distinct value for better performance. So only the first thousand records are fetched in the filter choices.
To overcome this default behavior, set the filter choice record count by setting the desired count for “FilterChoiceCount” in “OnActionBegin” event. Here is the code snippet for your reference.

<SfGrid TValue="Order" AllowPaging="true" AllowFiltering="true">

<GridFilterSettings Type ="Syncfusion.Blazor.Grids.FilterType.CheckBox">GridFilterSettings>

<GridEvents OnActionBegin="ActionBeginHandler" TValue="Order">GridEvents>

<SfDataManager Url="https://services.odata.org/V4/Northwind/Northwind.svc/Orders/" Adaptor="Adaptors.ODataV4Adaptor">SfDataManager>

<GridColumns>

. . .

GridColumns>

SfGrid>

@code{

. . .

public void ActionBeginHandler(ActionEventArgs args)

{

if (args.RequestType == Syncfusion.Blazor.Grids.Action.FilterChoiceRequest)

{

args.FilterChoiceCount = 2000; //here, you can override the default take count of the filter records

}

}

}



Loader.
Up arrow icon