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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set different filter types

Thread ID:

Created:

Updated:

Platform:

Replies:

147055 Aug 30,2019 09:04 AM UTC Sep 3,2019 12:44 PM UTC Angular - EJ 2 3
loading
Tags: Grid
Horváth
Asked On August 30, 2019 09:06 AM UTC

Dear support,

Is it possible to set different filter types for multiple columns?
For example i have three columns: Name: string, Active: boolean, Age: number and i want filterbar type for Name and Age and checkbox filter type for Active.

And if i set "allowFiltering" to false on a column when the type is filterbar is there a way to make it invisible?

Thanks in advance,
David

Dhivya Rajendran [Syncfusion]
Replied On September 2, 2019 04:16 AM UTC

Hi Horváth, 

Greeting from syncfusion. 

Query: Is it possible to set different filter types for multiple columns? 

Yes, you can use different filter types for columns in Grid. Please refer the below help documentation for more information. 


Query: And if i set "allowFiltering" to false on a column when the type is filterbar is there a way to make it invisible? 
 
We have analyzed your requirement and we suggest you to use the below way to achieve this. Please refer the below code example and sample for more information. 

In the below sample, we have bind the created event and set visibility hidden for the filterbar element. 

created(args){ 
  // set visibility hidden based on the column index 
  this.grid.getHeaderTable().querySelectorAll('.e-filterbarcell')[0].querySelector('.e-filterdiv').style.visibility = "hidden" 
} 



Regards, 
R.Dhivya 


Horváth
Replied On September 2, 2019 01:41 PM UTC

Thank your for your quick answer!

The second query helped me, but the first does not work if the grid type is set to "FilterBar". 

Kuralarasan Muthusamy [Syncfusion]
Replied On September 3, 2019 12:44 PM UTC

Hi Horváth, 
 
From your query, we found that you want to use “FilterBar and “CheckBox” filter both are in the same Grid. But it is not feasible to use the “FilterBar” with any other Grid filters. Due to avoid the UI related issues we have prevented this action by default in Grid. 
 
Regards, 
Kuralarasan M 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon