Hi,
I need to add and remove by code a TreeNode from a grouped ListGrid. The ListGrid is populate from a DataSource bind to a database.
I have tried this:
And this add the row just fine.
But when it comes to remove it, if I do like this:
The "remove" action will freeze the browser, the CPU gets to 100% and I have to kill the browser.
The ListGrid is populate by DataSource, and the node I need to add is actually a clone of another node, place in a different level.
I also try to use the add method (So I end uup with two nodes instead that just one), and it also works, but when I try to remove it, the CPU complain.
Can you give me any help?
I'm using SmartGWT 3.0.
Thank you very much
Barbara
I need to add and remove by code a TreeNode from a grouped ListGrid. The ListGrid is populate from a DataSource bind to a database.
I have tried this:
Code:
//TreeNode cc is a node place on a different level of the grid cc.setAttribute("customName", getCustomName()); grid.getGroupTree().move(cc, parent, position); fakeNodes.add(cc); //keep the node in the list so I can find it
But when it comes to remove it, if I do like this:
Code:
for (TreeNode child : fakeNodes) { if (child.getAttributeAsString("customName").equals(getStringToMatch()))) { grid.getGroupTree().remove(child); break; } }
The ListGrid is populate by DataSource, and the node I need to add is actually a clone of another node, place in a different level.
I also try to use the add method (So I end uup with two nodes instead that just one), and it also works, but when I try to remove it, the CPU complain.
Can you give me any help?
I'm using SmartGWT 3.0.
Thank you very much
Barbara
Comment