DHTML Tree with check boxes state not modifiable


I have a requirement where in I want some of the check boxes in my tree to be checked when the tree loads up and also that the user cannot then go and un-check these particular node. What changes do I have to make in the XML which I use to populate the tree control, is there an attribute which I can pass with some nodes which can dis-able the un-checking of the check box by the user.?



You can’t just disable unchecking, but you can

a) disable checkboxes by using
    <item id=“some” checked=“1” disabled=“1”
such item will be rendered as checked and disabled, which means its state can’t be changed ( you can change the look of image for disabled checkbox if necessary )

b) you can lock item - in such case it will ignore any action against it
    <item id=“some” checked=“1” locked=“1”
( please be sure to include ext/dhtmlxtree_li.js )