views:

95

answers:

2

http://wwwendt.de/tech/dynatree/index.html

Is it possible to disable individual nodes? If so, how?

A: 

Currently there's only the 'unselectable' node attribute. A workaround could be to let the onQueryActivate callback return false. And maybe add a custom class using the 'addClass' node option, to change the visual appearance.

http://code.google.com/p/dynatree/issues/detail?id=68

mar10
A: 
$("#tree").dynatree({
        […]
        onActivate: function(node) {

          node.data.unselectable = true; //make it unselectable
          node.data.hideCheckbox = true; //hide the checkbox (more for UI purposes)

          node.render(true);


        },
        […]
    });

would disable the node on the fly

gnomixa