Multiselect - Removing Selected Data Items from dropdown list

4 posts, 0 answers
  1. Joey
    Joey avatar
    7 posts
    Member since:
    Apr 2016

    Posted 08 Sep 2016 Link to this post

    Is there anyway to remove the items that have been selected from the dropdown list already?  For instance, the multiselect functionality changed somewhere between 2014 - 2016.  The list used to only show items that were not already selected.  Now it shows all items and it shows items that have already been selected by highlighting them.  Is there an option to make it hide the selected items from list?  What was the reasoning behind changing the functionality?
  2. Nencho
    Admin
    Nencho avatar
    1646 posts

    Posted 12 Sep 2016 Link to this post

    Hello Joey,

    In order to achieve the desired behavior you can simply apply the following css style rule, and add the class to the MultiSelect widget:

      .hide-selected > li.k-state-selected {
                display: none;
            }
     
    ...
     
    <script>
        $(document).ready(function () {
            var multiselect= $("#required").data("kendoMultiSelect");
            multiselect.ul.addClass('hide-selected');
    </script>


    Regards,
    Nencho
    Telerik by Progress
    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. Chris
    Chris avatar
    2 posts
    Member since:
    Sep 2013

    Posted 18 Jul in reply to Nencho Link to this post

    Is there a version of this solution that works with virtualization? I've found that selected items show as blank entries with virtualization enabled due to its fixed item height requirement.
  4. Nencho
    Admin
    Nencho avatar
    1646 posts

    Posted 20 Jul Link to this post

    Hello Chris,

    I have just replied to the other ticket, where you submitted a similar question, however, I am afraid that hiding items or removing them from the data source is not applicable in virtualization scenario.

    On the one hand, visually changing the appearance, like demonstrated in this forum post, is not applicable due to the reason that the virtualization relies on the items height to acquire the different portion of items. On the other hand, since the virtualization is a quite complex implementation - changing dynamically the data source is also not recommended as described in the following limitation section of the documentation article:

    http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#known-limitations 


    Regards,
    Nencho
    Progress Telerik
    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