Tie Autocomplete to MultiSelect

2 posts, 0 answers
  1. Eric
    Eric avatar
    2 posts
    Member since:
    Jan 2014

    Posted 17 Oct 2017 Link to this post



    I want to add the results from an AutoComplete, into the Multiselect on the fly (ie as you select it in autocomplete, it adds it to multi-select)

    Are there any examples of this?

  2. Nencho
    Nencho avatar
    1753 posts

    Posted 19 Oct 2017 Link to this post

    Hello Eric,

    In order to achieve the desired functionality, you should first subscribe for the select event of the Autocomplete :


    In the above event, you can get the selected item text and use the dataSource of the multiselect to add new record with that text (using dataSoucre add method)

    The implementation of this suggestion should look similar to the code snippet below:

    select: function(e) {
       var item = e.item;
       var text = item.text();
       var data = multiselect.dataSource;
       data.add({text: text})

    In addition, below is a dojo example, demonstrating the behavior:


    Progress Telerik
    Try our brand new, jQuery-free Angular 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