Upon select, modify the selected value

3 posts, 0 answers
  1. Dave
    Dave avatar
    35 posts
    Member since:
    Oct 2012

    Posted 10 Nov 2012 Link to this post

    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. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 13 Nov 2012 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Dave
    Dave avatar
    35 posts
    Member since:
    Oct 2012

    Posted 13 Nov 2012 Link to this post

    Thank you. I will give this a try!
Back to Top