Pasting in combo box is not filtering the options

4 posts, 0 answers
  1. Shubha Singh
    Shubha  Singh  avatar
    6 posts
    Member since:
    Oct 2012

    Posted 15 Oct 2015 Link to this post

    when we are typing in the combo Box, it is filtering correctly, but when we are pasting the text using "control" + V or by mouse right click and paste, then the options are not filtered.
  2. Plamen Lazarov
    Admin
    Plamen Lazarov avatar
    135 posts

    Posted 19 Oct 2015 Link to this post

    Hello Shubha Singh,

    The ComboBox filtering is turned off by default. In order filter the values when pasting text via "Ctrl + V", I suggest setting an appropriate filter:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/combobox#configuration-filter

    By design, filtering is performed when the keydown event is fired. When the value is pasted with the mouse, the event is not triggered, that's why the filtering is not working. This scenario is not supported, and I am afraid that there is no feasible workaround that I can offer. 

    On a side note, in order to be able to work with "Kendo UI Complete" and benefit from our support service, your account must be associated with an active license or a trial. Your applicable commercial license expired on October 16, 2015.

    If your company has spare licenses, please ask the license holder to assign your account as a licensed developer, as explained in "How do I assign developers to the purchased licenses?".

    Regards,
    Plamen Lazarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Bailey
    Bailey avatar
    3 posts
    Member since:
    Nov 2012

    Posted 29 Mar in reply to Shubha Singh Link to this post

    I was able to resolve this problem by adding an event handler to the paste event and having the paste event trigger a keydown event on the input box, here's the code:

     

    var ac = input.kendoComboBox({..}).data("kendoComboBox");

          ac.input.on("paste", function() {
            ac.input.trigger("keydown");
          });

  5. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 31 Mar Link to this post

    Hello Bailey,

    Thank you for sharing your solution with the community.

    Regards,
    Nencho
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready