CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Unselectable ?!

by assapan » 15 Dec 2015 09:56

Hi,
I'd want to set some nodes as disabled depending of environment .

How property unselectable works and does it works ?
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by Alexander Bulei » 15 Dec 2015 10:39

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,
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to JQDynaTree

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.