:: Forum >>

Checkboxes in only some nodes in Tree structure

HI Alex,

We are having a tree structure in our app and what to put check boxes in few of the nodes?
using the post in forum subject /javascript.forum.20625.0/fix-missing-click-event-in.html I am able to get the checkboxes for all the nodes.

But want the checkboxes only in few nodes.
Also have one issue here.
By default the checkBoxes are not visible unchecked but those are with horizontal dash '-' in them. then we have to click it to make it uncheck and again click to make it checked.

Thanks in advance.
Swapnil.
Swapnil
Tuesday, December 16, 2008
You can use this code to define CheckBox templates only on Item- numbers based on Array.
Sorry no luck for the other issue.
HTH
var treeCB = [2,6];
for(var x=0;x<treeCB.length;x++){tree.setItemTemplate(new MyTreeCheckbox, treeCB[x])}

Carlos
Tuesday, December 16, 2008
Hi Carlos,

it worked.... thanks for the help...

Need help reg the second issue.....
still I m getting horizontal '-' in the chkBox.... after tree is loaded.

Thanks,
Swapnil.
Swapnil
Wednesday, December 17, 2008
I think, obj.setItemValue(false); should set the checkbox value as unchecked.

Thanks
VJ
Thursday, January 29, 2009
http://www.activewidgets.com/javascript.forum.20487.2/tree-with-checkbox.html
Thursday, January 29, 2009

This topic is archived.


Back to support forum

Forum search