Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mark Ritter on Oct 28, 2008 17:46
open dhtmlx forum
Disable a checkbox

Could an option be added to disable/enable a checkbox?

combo.enableCheckbox(index);
combo.disableCheckbox(index);


To go along with that, if checkbox 1 is not checked, I will set checkbox 2 disabled.
I check checkbox 1, I will enable checkbox 2. But do this while the combo is still open. onChange events need to happen while open. They don't until close it.


Mabybe indent items?

[ ] Check box 1
[ ] Dependent on checkbox 1
[ ] More children
[ ] Checkbox 4

Visual que that first box must be checked to enable children.
Answer posted by Support on Oct 29, 2008 06:52
There is no API to do this.
But you can use the following approach in order to enable/disable checkboxes

combo.getOption(value).content.firstChild.disabled=true;
combo.getOption(value).content.firstChild.disabled=false;