5

Is there anyway to disable fancytree node? Am using Select: 2 option along with Ajax call to populate the tree. I get the data from DB and need to show my preselected node selected and disabled as below. enter image description here

One option is to set below properties as:

hideCheckbox: true

selected: true

But this makes the checkbox hidden (as shown in green background below) enter image description here

Can't I just disable the node itself(as in 1st pic)? Something similar to diabling of entire tree with below option.

disabled: false (disables the tree)

UPDATE

If I use unselectable true then I loose the checked box check. ( screen below)

unselectable: true

selected: true

enter image description here

pranav
  • 421
  • 1
  • 11
  • 27

1 Answers1

4

There is no option to disable a node altogether, but you can 'disable' checkboxes using the unselectable option.

mar10
  • 14,320
  • 5
  • 39
  • 64
  • If I use `unselectable` true and `selected` true(for showing default check) then I loose the check box checkmark. I have copied the screeshot above. – pranav Jul 16 '15 at 07:32
  • This should have been fixed: https://github.com/mar10/fancytree/issues/427 Are you using a current release? – mar10 Jul 16 '15 at 07:37
  • Thanks !! Ya, I was using old version. Updated the CSS, fine now. Moreover is there a way to send data through JSON to prepopulate the textboxes? I am using the complex demo example. I tried adding a property in json as input1 and tried to access it in `renderColumns` as `node.input1` in similar line to node.key. Didn't worked. Looks like have to make use of `postProcess`. In between Thanks for the Awesome work :) – pranav Jul 16 '15 at 10:03