Hi,
I have a problem related to a smartgwt Tree structure.
I'm creating a Tree (called nodesTree) with values from a DB, and each node has a name set up.
For ex I'm having 4 nodes (the numbers are the names of the nodes):
1
--2
3
--4
(ignore '--')
Output: 1 2 3 4
If I drag node 4 under node 1(at the same level as 2)
1
--2
--4
3
(ignore '--')
I want to have the order of nodes: 1 2 4 3 but if I repeat the above "for" statement the output will be the same as above: 1 2 3 4.
TreeGrid.refreshFields() does not work.
I'm using smartgwt 2.4.
Thank you.
------------------------------------
Later edit:
The tree is manually populated. I'm adding the nodes to the tree manually from code, accoding to some values that I'm receiving from DB.
I have a problem related to a smartgwt Tree structure.
I'm creating a Tree (called nodesTree) with values from a DB, and each node has a name set up.
For ex I'm having 4 nodes (the numbers are the names of the nodes):
1
--2
3
--4
(ignore '--')
Code:
for (TreeNode node : nodesTree.getAllNodes()){ System.out.print(node.getName()); }
If I drag node 4 under node 1(at the same level as 2)
1
--2
--4
3
(ignore '--')
I want to have the order of nodes: 1 2 4 3 but if I repeat the above "for" statement the output will be the same as above: 1 2 3 4.
TreeGrid.refreshFields() does not work.
I'm using smartgwt 2.4.
Thank you.
------------------------------------
Later edit:
The tree is manually populated. I'm adding the nodes to the tree manually from code, accoding to some values that I'm receiving from DB.
Code:
Tree nodesTree = new Tree(); TreeGrid navTreeGrid = new TreeGrid(); navTreeGrid.setData(nodesTree); navTreeGrid.setCanReorderRecords(true); navTreeGrid.setCanReparentNodes(true);
Comment