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

Upon select, modify the selected value

2 Answers 106 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 10 Nov 2012, 07:34 PM
Hello. When the user selects a value in the Kendo AutoComplete textbox, I want to run a function to modify the selected value (for example, remove unwanted characters) and have that be returned to the textbox.

For example, I would call the below function upon Select:
function editText(e) {
    var text = this.dataItem(e.item.index());
    text = text.replace(myRegexPattern, '');
    (?????) = text;
};
Is there a property I can set, or an easy way to update/modify the selected text in this way? Thanks!

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 13 Nov 2012, 08:30 AM
Hello Dave,

 
You can wire the change event and use the value method to set the modified value. Let me know if other questions arise.

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dave
Top achievements
Rank 1
answered on 13 Nov 2012, 10:59 PM
Thank you. I will give this a try!
Tags
AutoComplete
Asked by
Dave
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Dave
Top achievements
Rank 1
Share this question
or