EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: mzeddd on October 10, 2013, 06:05:47 AM



Title: combobox with disabled item
Post by: mzeddd on October 10, 2013, 06:05:47 AM
Hi,

Is it possible to have disabled flag for combobox in the same way as it exists in <select> Tag ?

Code:
<select size="1" class="easyui-combobox" >
<option value="1">1</option>
<option value="2" disabled>2</option>
</select>

Thanks!


Title: Re: combobox with disabled item
Post by: stworthy on October 11, 2013, 05:58:24 PM
This feature will be supported in next version 1.3.5. You can download the updated combobox plugin from http://www.jeasyui.com/easyui/plugins/jquery.combobox.js. Be sure to add the 'combobox-item-disabled' css style to the page.
Code:
<style>
.combobox-item-disabled{
opacity: 0.5;
filter: alpha(opacity=50);
}
</style>


Title: Re: combobox with disabled item
Post by: thecyberzone on July 22, 2020, 11:14:37 AM
And how to disable a single row in the combobox programmatically?


Title: Re: combobox with disabled item
Post by: stworthy on July 22, 2020, 11:51:56 PM
The code below shows how to disable the second line on the combobox items.
Code:
var cc = $('#cc');
var data = cc.combobox('getData');
data[1].disabled = true;
cc.combobox('loadData', data);