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

How to use contains filter on an integer column

2 Answers 417 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Samira
Top achievements
Rank 1
Samira asked on 15 Feb 2014, 07:47 AM
Hello,
My client wants to filter integers column by contain operator . How can i add contain filter operator on integer column ?

2 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 19 Feb 2014, 05:15 PM
Hello Samira,

Thank you for writing.

In this case you can use custom filtering and convert the value to string and compare it with your string. Please note that this functionality does not replace the default one and should be used separately.

More information is available in the following articles:

Also you can change the column type to string which will automatically enable this option.

Do not hesitate to contact us if you have other questions.

Regards,
Dimitar
Telerik
0
Pham
Top achievements
Rank 1
answered on 21 Sep 2018, 02:07 AM

orfilter.filters.push(
{ field: "TEN_POS", operator: "contains", value: search },
{ field: "MA_POS", operator: "contains", value: search },
{ field: "DIACHI_POS", operator: "contains", value: search },
{ field: "PHIEUTK_ID", operator: (value) => (value + "").indexOf(search) >= 0 } // here.
);
me.DieuHanhGridOptions.dataSource.filter(orfilter);

 

Tags
GridView
Asked by
Samira
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Pham
Top achievements
Rank 1
Share this question
or