PDA

View Full Version : TreeGrid doens't show child nodes



edumrf
24 Jun 2009, 9:27 AM
Hi, i'm using the TreeGrid class and dynamically loading the child nodes through a RPC service, i'm loading the nodes on the on Expand event, here's the code:



myTreeGrid.addListener(Events.BeforeExpand, new Listener<TreeGridEvent>() {
public void handleEvent(TreeGridEvent te) {
BaseTreeModel baseModel = new BaseTreeModel();
baseModel.set("id", "1234");
baseModel.set("name", "test");
((BaseTreeModel)te.getModel()).add(baseModel);
te.getTreeGrid().getTreeView().refresh(true);
}
});
myTreeGrid.addListener(Events.Expand, new Listener<TreeGridEvent>() {
public void handleEvent(TreeGridEvent te) {
//getTreeViewGrid().getTreeView().layout();
te.getTreeGrid().getTreeView().refresh(true);
}
});
but the nodes never show up on the grid, already inspected the TreeStore and all the records are there. Any ideas?

Thanks.

sven
24 Jun 2009, 9:31 AM
There is a bug un m3 with dynamic adding items. This is already fixed in SVN