This topic contains 2 replies, has 2 voices, and was last updated by bosjabosja 14 years ago.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › General Discussions › Lists › ComboBox › Filter problem
Tagged: combo box, combobox, combobox control, combobox filter, combobox plugin, combobox widget, javascript combobox, jquery combobox, ui combobox
This topic contains 2 replies, has 2 voices, and was last updated by bosjabosja 14 years ago.
Hello,
I have a problem with search in combobox. When I try to search for some item, and stop typing in middle of word, and then click outside of combobox, in the head of combobox will be be just the half of the word, not some item. Is it possible that in this situation, we react with default selected index or something like that.
Thanx
Hi bosjabosja,
You can do the following:
– bind to the ComboBox’s select, open and close events.
– create a variable called selectedIndex. Save the new selected index in this variable when the combobox is opened or when the user selects an item with mouse or keyboard.
– set the ComboBox’s selectedIndex property when the ComboBox’s popup is closed.
var selectedIndex = -1;$("#jqxComboBox").bind('select', function (event) { if (event.args && event.args.type != 'none') { selectedIndex = $("#jqxComboBox").jqxComboBox('selectedIndex'); }});$("#jqxComboBox").bind('open', function (event) { selectedIndex = $("#jqxComboBox").jqxComboBox('selectedIndex');});$("#jqxComboBox").bind('close', function (event) { $("#jqxComboBox").jqxComboBox({ selectedIndex: selectedIndex });});
Best Regards,
Peter Stoev
http://www.jqwidgets.com
jQWidgets Team
Thank you very much,
that’s exactly what I needed
You must be logged in to reply to this topic.