EasyUI Forum
April 28, 2024, 02:26:21 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: combobox with disabled item  (Read 11601 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« 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!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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>
Logged
thecyberzone
Full Member
***
Posts: 176



View Profile Email
« Reply #2 on: July 22, 2020, 11:14:37 AM »

And how to disable a single row in the combobox programmatically?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 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);
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!