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

apply phone number mask

2 Answers 549 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vince
Top achievements
Rank 1
Vince asked on 06 Jan 2017, 08:59 PM

Hi! 

I have one column in my kendo grid.

 columns.Bound(c => c.PhoneNumber).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));

I use the build-in filter for this column. However, my data of "PhoneNumber" is a STRING in "(123)-456-7890" format. So when I put 1234567890 in the filter textbox, there is no result. I saw an example to apply a phone number mask for kendo text box. Is it possible to apply one for a grid column filter?

2 Answers, 1 is accepted

Sort by
0
Vince
Top achievements
Rank 1
answered on 09 Jan 2017, 02:23 PM
Update, I'm trying to find the ID of the built-in filter textbox. Then I can use jquery to add a keyup event to achieve the mask. Is there any way to add a id to the textbox?
0
Daniel
Telerik team
answered on 10 Jan 2017, 12:00 PM
Hello Vince,

Here is one of the possible ways to get access the textbox:
$("#grid input[data-text-field='ShipName']")

You can test the snippet in the following demo:
Filter row demo

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