Page 1 of 1

Unselectable ?!

PostPosted: 15 Dec 2015 09:56
by assapan
Hi,
I'd want to set some nodes as disabled depending of environment .

How property unselectable works and does it works ?

Re: Unselectable ?!

PostPosted: 15 Dec 2015 10:39
by Alexander Bulei
Hi assapan,

How property unselectable works and does it works ?


Unselectable property prevents the selection of checkbox/radio elements, only.
Unfortunately, there is no properties for this, but you can do this:

delphi code
IWCGJQDynaTree1.Nodes[0].AddClass:= 'dynatree-node-disabled';


Then use the OnQueryActivate.script event and check the node:

javascript code
function (flag, dtnode){
if ($(dtnode.span).hasClass("dynatree-node-disabled")){
return false;
}
}


For better UI, you can implement some css style for dynatree-node-disabled.

Best Regards,