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

Filtering with FilterBar column type


when I am trying to filter data in FilterBar I need to get column type but even if I set type for column - on filter it is every time undefined. I am doing something wrong? Or I am searching not where it should be?

I am sending sample where you can see that columns have types but on searching the type is undefined: https://stackblitz.com/edit/angular-tww3dj-op5n7u?file=app.component.ts

1 Reply

PS Pavithra Subramaniyam Syncfusion Team June 18, 2019 10:08 AM UTC

Hi AC, 
Thanks for contacting Syncfusion support. 
In the actionBegin event arguments, You can get the information about current filtering column “type” by invoking getColumnbyField method of the Grid with current filtering column name. 
Please find the below code snippet and documentation link for more information. 
ngOnInit(): void {  
if(args.requestType === 'filtering'){  
let filterColumn = this.grid.getColumnByField(args.currentFilteringColumn); //here you can get the current filtering column column details. 
let columnType = filterColumn.type;  //here you can get the column type 
Please get back to us if you need further assistance. 
Pavithra S. 

Live Chat Icon For mobile
Up arrow icon