jQWidgets Forums
jQuery UI Widgets › Forums › Lists › ComboBox › Select more than 1 item
Tagged: combobox, multiple selection combobox
This topic contains 8 replies, has 4 voices, and was last updated by jcaballero 10 years, 1 month ago.
-
AuthorSelect more than 1 item Posts
-
Hi
Is it possible to select more than 1 item in the combo dropdown? I am using the following code and for example, if a user enters say DEMO1, then I need to select all entries that appear in the dropdown for the autocomplete. Let me clarify. If a user performs an autocomplete and say 10 items match what the user has typed, then I need to select all 10 entries pass there values to php. Thanks$("#jqxComboBox").jqxComboBox({ source: dataAdapter, theme: 'ui-smoothness', width: '260px', height: '25px', searchMode:'startswithignorecase', autoComplete:true, selectedIndex: -1, displayMember: 'custref', valueMember: 'custref', multiSelect: true, placeHolder: "Enter search" });
Hi mr_putersmit,
There are 2 options: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxcombobox/multiselect.htm?arctic and http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxcombobox/checkboxes.htm?arctic
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thank you Peter.
And how to get selected item?? It seems doesn’t work!
Hi oGoblin,
If you’ve looked at the documentation and methods like getSelectedItem, you would see and learn how to work with it and that it actually works perfectly well when it is used correctly – http://jsfiddle.net/jqwidgets/3ytjs/
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Sorry Peter.
When I ask question my jqxComboBox was in “multiSelect: true” mode and in this way getSelectedItem doesn’t work for me.
How can I get the selected items in this case? And second – renderSelectedItem doesn’t fired when multiSelect.Hi oGoblin,
renderSelectedItem will not be fired in that mode because it is much different rendering mode and it is not supposed to be called. getSelectedItem is for single-selection mode, not for mode where you have multiple selection. This example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxcombobox/multiselect.htm?arctic shows how to get the Selected Items. If you wish, use the same approach.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/You’re right.. Missing getSelectedItems in documentation
-
AuthorPosts
You must be logged in to reply to this topic.