Grid filter only displays values from the first 1000 elements in the datasource

Hi,

We're using ej2-grids (19.4.52) with CheckBox filtering enabled. Our grids have many elements (5k+) which makes it impossibe to filter specific columns since filter options are picked out from the first 1000 elements in the datasource.

We're wondering:

  • Is it possible to modify the limit of 1000 elements
  • or Is it possible to specify the filter options elsewhere
  • or will this be fixed
  • or if none of the above, Can you point us to where in the source code these options are selected for the grid



Reproduction:

  • Create an ejs-grid with CheckBox filtering enabled
  • Add a single column to the grid
  • Create a data source using a list which has elements using the same column name and add it to the grid
  • Add more than 1000 elements to the datasource  
  • Set the values of the column in the datasource to start from 0 and increment per element [{col:0}, {col:1} {col:2},...{col:n-1}]
  • Open the filter menu for the specified column
  • You'll now see that the last option in the filter menu is 999, while it should've been n-1 (count of elements -1)


1 Reply 1 reply marked as answer

RR Rajapandi Ravi Syncfusion Team August 23, 2022 01:44 PM UTC

Hi Furkan,


Greetings from Syncfusion support


By default, the Excel/Checkbox filter in the Grid will display the data from the first 1000 records to optimize performance. The other records will be returned as result in the search option of the Filter dialog. This is the default behavior of Grid.


You can increase the Excel filter count by modifying the filterChoiceCount argument value in the actionBegin event when the requestType is ‘filterchoicerequest’ as demonstrated in the below code snippet,


// Grid’s actionBegin event function

function onActionBegin(args) {

        if (args.requestType === "filterchoicerequest") {‘

            // Filter choice count is modified

            args.filterChoiceCount = 1500;  //modify value here as you want

        }

}


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


Regards,

Rajapandi R


Marked as answer
Loader.
Up arrow icon