Hi Costa,
Greetings from Syncfusion.
Query: How to return ALL unique values for Blazor DataGrid excel filter checkbox (not only distinct values from the first 1000 records of Grid dataSource)?
We have validated your query and by default, in Excel type filter the filter choice record count is limited to 1000 (take first 1000 records and then apply distinct value)for better performance. So only the first thousand records is fetched in the filter choices. To overcome this default behavior, you can set the filter choice record count as per your requirement by setting the desired count for “FilterChoiceCount” in “OnActionBegin” event.
Please use the code below,
|
<SfGrid DataSource="@Orders" AllowFiltering="true">
<GridEvents OnActionBegin="ActionBeginHandler" TValue="Order"></GridEvents>
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Excel"></GridFilterSettings>
. . .
</SfGrid>
@code{
...
public void ActionBeginHandler(ActionEventArgs<Order> args)
{
if(args.RequestType == Syncfusion.Blazor.Grids.Action.FilterChoiceRequest)
{
args.FilterChoiceCount = 2000; //here, you can override the default take count of the filter records
}
}
}
|
Please get back to us if you need further assistance.
Regards,
Rahul