Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stephane Laframboise on Mar 24, 2008 10:58
open dhtmlx forum
Disabled checkboxes and 3 States Checkboxes

Hello,

I am using a tree with the three state checkboxes feature enabled.
Now, i would like to make some of the branches disabled, the problem is that it does not reflect if the branch is partially checked anymore. Is there anyway to get disabled branches to show if they are partially checked by their children nodes ?

Thank you !
Answer posted by Support on Mar 25, 2008 03:29
Be default disabled node frozen in state , which it has on moment of disabling and will not react on changes of parent element
You can change behavior by code modification, just locate next string in dhtmlxTree.js

if (sNode.dscheck)  sNode.checkstate=sNode.dscheck;

and replace it with

if (sNode.dscheck)  sNode.checkstate=sNode.checkstate+3;
Answer posted by Stephane on Mar 25, 2008 06:24
Hi, the code you gave me to modify did not affect the checkboxes but simply made the [+] square remain the same and never change to [ - ] ..... help
Answer posted by Support on Mar 25, 2008 10:45
Please check attached sample, it contains described updates to code and works as necessary - disabled checkbox still disabled, by reflect state of its parent.
Attachments (1)
Answer posted by Stephane Laframboise on Mar 28, 2008 11:01

Is this supposed to work with the dynamic smart parsing tree ?

The code change you have given me has not affected the tree... HELP !