How can I add partial match new item.

2 posts, 0 answers
  1. Jiatang
    Jiatang avatar
    9 posts
    Member since:
    Sep 2015

    Posted 05 Apr 2017 Link to this post

    I notice that kendo has a new feature to customize the noDataTemplate. Then you can use that to allow user adding a new item when there is no match.

    Just like this example:



    But what if I want to add a new item of partial match. Say you have "Chai" in the options, but I want to add "Cha". Can we do that with kendo?

  2. Ivan Danchev
    Ivan Danchev avatar
    1885 posts

    Posted 07 Apr 2017 Link to this post

    Hello Jiantang,

    The scenario shown in our demo involves using the noDataTemplate, which is displayed only when no results matching the entered string are found. Whereas in the scenario you describe if "Chai" is present in the data source and you enter "Cha" the template will not be displayed, because a match will be found ("Chai") and returned, thus the noDataTemplate cannot be used for adding a new item in this case. We can suggest considering using the filtering event, in the handler of which you can access the user input and implement your own logic for adding a new item to the MultiSelect's data source.

    Ivan Danchev
    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.
Back to Top