I have a Tree in a TreeGrid and would like to add grandchildren to the Tree that are checkboxes. How can I do this? Currently, when I add children to the Tree, they appear with what looks like a document icon.
Here is my TreeGrid and Tree:
var tgrid = isc.TreeGrid.create({
ID: "tgrid",
width: "100%",
fields: [{
name: "title",
title: "current "
}],
data: isc.Tree.create({
ID: "currenttree",
root: {
children: [{
title: "treeFolder",
canDrag: false,
isFolder: true,
children: [{
}]
}]
}
})
});
I add children to the Tree. I am trying to get these children to appear as checkboxes.
let thetree = tgrid.getData(); // I get the tree from the treegrid
let treenodes = thetree.getAllNodes(); // tree nodes
// here I try to add a checkbox child to the folder I have under the tree, but it appears not as a checkbox but as a document
thetree.add(({
name: "treeGrandchild",
type:"checkbox",
isFolder: false,
title: "grandchild",
}),treenodes[0]);
Here is my TreeGrid and Tree:
var tgrid = isc.TreeGrid.create({
ID: "tgrid",
width: "100%",
fields: [{
name: "title",
title: "current "
}],
data: isc.Tree.create({
ID: "currenttree",
root: {
children: [{
title: "treeFolder",
canDrag: false,
isFolder: true,
children: [{
}]
}]
}
})
});
I add children to the Tree. I am trying to get these children to appear as checkboxes.
let thetree = tgrid.getData(); // I get the tree from the treegrid
let treenodes = thetree.getAllNodes(); // tree nodes
// here I try to add a checkbox child to the folder I have under the tree, but it appears not as a checkbox but as a document
thetree.add(({
name: "treeGrandchild",
type:"checkbox",
isFolder: false,
title: "grandchild",
}),treenodes[0]);
Comment