This is a migrated thread and some comments may be shown as answers.

Kendo Angular Grid --> Gird Column with filter="numeric" --> it is dont have contains filter option

1 Answer 583 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sankar
Top achievements
Rank 1
Sankar asked on 01 Jun 2018, 06:13 AM

Hi Team,

I am using Kendo Angular Gird. I have requirement to display the years in one column. I have as filter option with numeric. 

But this numeric option does not have "Contains" as filter option.

Example : 18 given no results, if I give exact match [2018] returns results.

Is it possible to add contains option here on numeric columns?

 

Thanks,

Sankar

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 04 Jun 2018, 10:15 AM
Hello Sankar,

Typically the "contains" filter is applied to string values only, as numeric values cannot be compared this way out-of-the-box. You can handle the Grid filterChange (or dataChangeEvent), access the current filter value for the respective field and perform the desired custom logic to filter the data items manually, based on the desired output.

Alternatively (the more straight-forward approach), you can map the data such that the data for the years field is a string and use the built-in string filtering for this column, e.g.:

https://plnkr.co/edit/qkXtJZOZ1Xt1b17QAzJx?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Sankar
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or