Alternate way to keep the multiselect open

5 posts, 0 answers
  1. iConect Developer - Mike
    iConect Developer - Mike avatar
    28 posts
    Member since:
    Oct 2009

    Posted 14 Feb Link to this post

    Is there another way to get the multiselect to stay open other then having autoClose set to false?

    I would like it to stay open only while the user is pressing ctrl, so that they could select multiple items and when they release the ctrl key to would close the multiselect, or if they only want to select one they would not have press ctrl and it would close right after they have selected an item.

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1579 posts

    Posted 16 Feb Link to this post

    Hello,

    Here's a dojo example, which shows how the described behavior can be achieved with jQuery and the MultiSelect's close API method.

    Regards,
    Ivan Danchev
    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.
  3. iConect Developer - Mike
    iConect Developer - Mike avatar
    28 posts
    Member since:
    Oct 2009

    Posted 27 Feb Link to this post

    I had a code similar to that the issue I was getting was that when you typed in some text to filter the items even with holding ctrl it was still closing, and that issue also happens with the dojo you have posted.
  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1579 posts

    Posted 01 Mar Link to this post

    Hello,

    With the following modification to the click handler attachment selecting items while holding down Ctrl after filtering does not close the dropdown:
    $( ".k-list-scroller" ).delegate( ".k-item", "click", function(evt) {
          if (evt.ctrlKey) {
            console.log('Ctrl down');
            isCtrlClick = true;
          }
    });

    Updated dojo example.

    Regards,
    Ivan Danchev
    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.
  5. iConect Developer - Mike
    iConect Developer - Mike avatar
    28 posts
    Member since:
    Oct 2009

    Posted 02 Mar Link to this post

    Thank you
Back to Top