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