What do you actually mean by \"disabled\" do you need to set some specific style to node, or disable checkbox or what?
Typically, additional nodetype \"disabledNodeType\" with specific style/behavior setting is needed to be added. And used for \"disabled\" nodes.
But this is not a client-side way.
For client side, you cannot assign this \"disabled\" nodetype to node that is already in treeview.
Instead, you can remove node from treeview, set its nodetype to \"disabledNodeType\" and insert it in place of where it was removed from.
This does not look trivial.