Filter list does not show all values

We have a grid with ~5,000 rows using the excel filter that should show 3 values in the filter list. Instead it shows 2 out of the 3 as seen here:


When I start entering the missing 3rd value it appears as shown here:



Can I control this behaviour so the third choice always appears?


3 Replies 1 reply marked as answer

PS Pavithra Subramaniyam Syncfusion Team June 19, 2023 10:32 AM UTC

Hi eric,


Greetings from Syncfusion.


By default, while opening the Excel/checkbox filter in the Grid, the filter dialog will get and display only the distinct data from the first 1000 records bound to the Grid to optimize performance. The remaining records will be returned as a result in the search option of the Filter dialog. This is the default behavior of this functionality.


We suspect that in your case, the 1st 1000 records only have the 2 values, so we suggest you increase the filter count by modifying the filterChoiceCount argument value in the actionBegin event when the requestType is ‘filterchoicerequest’ as demonstrated in the below code snippet,


 

<ejs-grid #grid [dataSource]="data" allowFiltering="true" [filterSettings]="filterSettings"

  (actionBegin)="actionBegin($event)">

.  .  .

</ejs-grid>

 

 

actionBegin(args) {

  if ( args.requestType == 'filterchoicerequest' || args.requestType == 'filtersearchbegin') {

    args.filterChoiceCount = 5000;

  }

};

 

 


https://ej2.syncfusion.com/angular/documentation/api/grid/#actionbegin


Regards,

Pavithra S


Marked as answer

ER eric June 19, 2023 01:57 PM UTC

that works perfectly. thank you.



SG Suganya Gopinath Syncfusion Team June 20, 2023 11:27 AM UTC

We are glad that the provided solution helped to solve the issue. Please get back to us for further assistance.


Loader.
Up arrow icon