This is a migrated thread and some comments may be shown as answers.

Alternate way to keep the multiselect open

4 Answers 636 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
iConect Developer - Mike
Top achievements
Rank 1
iConect Developer - Mike asked on 14 Feb 2018, 02:50 PM

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.

4 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 16 Feb 2018, 10:01 AM
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.
0
iConect Developer - Mike
Top achievements
Rank 1
answered on 27 Feb 2018, 04:27 PM
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.
0
Ivan Danchev
Telerik team
answered on 01 Mar 2018, 10:01 AM
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.
0
iConect Developer - Mike
Top achievements
Rank 1
answered on 02 Mar 2018, 03:37 PM
Thank you
Tags
MultiSelect
Asked by
iConect Developer - Mike
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
iConect Developer - Mike
Top achievements
Rank 1
Share this question
or