JavaScript ComboBox
Set the validateSelection property of the jqxComboBox. Author: http://jqwidgets.com
by jqwidgets
HTML
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div id='jqxComboBox'></div>
JavaScript
var source = [
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait",
"Caffé Corretto",
"Café Crema",
"Caffé Latte"
];
// Create a jqxComboBox
$("#jqxComboBox").jqxComboBox({
source: source,
width: '250px',
height: '25px',
multiSelect: true,
theme: 'energyblue',
validateSelection: function(itemValue)
{
if (itemValue == "Breve")
return false;
return true;
}
});
$("#jqxComboBox").jqxComboBox('selectItem', 'Breve');
$("#jqxComboBox").jqxComboBox('selectItem', 'Americano');