We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Filter custom dataSource

Hi,
I am able to set custom dataSource to filter popup in Grid using below code.

args.filterModel.options.dataSource = [.....];

However, after filter for multiple columns, the previous filter popup is refreshing its list based on the Grid row data.

My requirement is we need to show all the list in filter popup with selected filter checked.
How can we achieve this.

Quick help would be appreciated

Thanks


1 Reply

RS Rajapandiyan Settu Syncfusion Team November 23, 2022 05:33 AM

Hi Neha,


Thanks for contacting Syncfusion support.


If we provide the custom filter dataSource in the actionBegin event, it will conflict with the default Grid’s filtering. So, we are not supposed to provide custom dataSource in the actionBegin event.


By default, the Excel/ Checkbox filter Dialog in the Grid will display the distinct data from the first 1000 records in grid dataSource to optimize the performance.


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


 

function actionBegin(args){

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

 

 args.filterChoiceCount = 5000;   // change the filterchoicecount value as you need (the filter check list shown based on this value )

 }

}

 


Find the below documentation for your reference.


https://www.syncfusion.com/kb/13372/how-to-change-the-filter-choice-value-count-for-grid-excel-filter


Still, if you face the same issue, kindly share the below details to validate further.


  1. Share the complete Grid code files and package.json file.
  2. Which type of data-binding (remote/local) you have used in the Grid? share the code details.
  3. Share the video demo of the reported problem.
  4. If possible, share a simple issue reproducible sample which will be very helpful for us.


Regards,

Rajapandiyan S


Loader.
Live Chat Icon For mobile
Up arrow icon