3.2.0

Is bug in Tree UI

Hello.
I have been developed project using ActiveWidgets 2.0.2. In my project I use Tree UI. I had posted question "Problem with edit tree node" but nobody answer for my question. I know in Grid edit cell very simple we only setCellEditable(true) but in tree view complex. I have just done some test like this:
<code>
var treeText = ["", "<input type='text' value='text'/>", "<input type='checkbox'/>", "<input type='checkbox'/>", "<input type='radio'/>", "<input type='text'/>", "<input type='file'/>"];
var treeImage = ["", "home", "favorites", "fontsize", "search"];
var treeView = {0:[1, 2, 3, 4], 1:[5, 6], 2:[7], 3:[8], 4:[9]};

var tree = new AW.UI.Tree;
tree.setId("tree1");
tree.setItemText(treeText);
tree.setItemImage(treeImage);
tree.setViewCount(function(i){return treeView[i] ? treeView[i].length : 0});
tree.setViewIndices(function(i){return treeView[i]});
tree.setCurrentItem(1);
tree.refresh();
document.write(tree);
</code>
You run source code above and give me advise "is this bug". If it's bug please fix them. And could you please show me howto do when you mouse click in tree node and then node can edit text. Sorry for my English. Thanks
TrungCuvel
November 7,
Sorry, I still do not understand what is the problem. The standard tree does not include editing functionality.
Alex (ActiveWidgets)
November 8,
Hello Alex
In my above source code you can see treeText variable instead of normal value like this:
treeText = ["", "Node 1", "Node 2", "Node 3", "Node 4", "Node 5", "Node 6", "Node 7"]
You can change normal value by html code for example:
treeText = ["", "<input type='text' value='text'/>", "<input type='checkbox'/>", "<input type='checkbox'/>", "<input type='radio'/>", "<input type='text'/>", "<input type='file'/>"]
What happened when you run tree code with text node value is html. Thanks
TrungCuvel
November 8,
The tree items do not expand automatically - if you want to make input controls visible you have to increase the size of tree items.
Alex (ActiveWidgets)
November 12,
Thanks Alex.
TrungCuvel
November 14,

This topic is archived.

See also:


Back to support forum