Grid Filter dosen't cover all items when the total number is large (maybe more than 1500)

Hi team,

From the sample project, you can obtain a Grid with 1500 entries. If you try to filter them by Excel/CheckBox mode, you will find that some of the choices are missing. I supplied a screenshot to show the issue. Please check if it's a bug. Thanks.

Regard.

Attachment: SyncfusionBlazorGridFilterTotal_3ec18592.rar

3 Replies 1 reply marked as answer

RN Rahul Narayanasamy Syncfusion Team September 8, 2020 06:22 AM UTC

Hi Brian, 

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  ID="Grid" DataSource="@Orders"  @ref="Grid" . . .> 
        . . . 
        <GridEvents OnActionBegin="ActionBeginHandler" OnToolbarClick="ToolbarClick" TValue="Order"></GridEvents> 
        <GridColumns> 
            . . . 
        </GridColumns> 
    </SfGrid> 
</div> 
. . . 
@code{ 
    public List<Order> Orders { get; set; } 
    SfGrid<Order> Grid; 
    . . . 
    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 


Marked as answer

BR Brian September 14, 2020 04:49 AM UTC

Thanks, it works.


RN Rahul Narayanasamy Syncfusion Team September 15, 2020 04:57 AM UTC

Hi Brian, 
 
Thanks for the update. 
 
We are happy to hear that the provided solution was helpful to achieve your requirement. Please get back to us if you need further assistance. 
 
Regards, 
Rahul 


Loader.
Up arrow icon