jQuery UI Widgets › Forums › Lists › ComboBox › multiselect maximum limit selected items
Tagged: #combobox, javascript combobox, jquery combobox, jqwidgets combobox, multiselect maximum limit selected items
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 8 years, 1 month ago.
Hi!
Is it possible to limit maximum number of selected items when multiSelect is true?
I didn’t find the property for this but I did found a “workaround”:
$("#jqxComboBox").on('change', function (event) { var items = $("#jqxComboBox").jqxComboBox('getSelectedItems'), args = event.args; if (items.length === 3) { $("#jqxComboBox").jqxComboBox('unselectIndex', args.index); return false; } }});
Hi, is there a prettier solution in new version?
Hello jqWizard,
Unfortunately, there is no such option. Thank you to share this workaround with the community.
Best Regards, Hristo Hristov
jQWidgets team http://www.jqwidgets.com
You must be logged in to reply to this topic.