View Full Version : Async TreeGrid expand all children
locojay
7 Aug 2009, 12:55 PM
Hi I have an async TreeGrid an I would like to expand all the Children of that Node.
I tried the following
pathtree.setExpanded(be.getModel(), true,true);
but that does not work. Is this because the TreeGrid is Async? Any ideas?
Thanks
fdussert
3 Sep 2009, 6:18 AM
I hope my answer is not too late ...
Yes, it's probably because the treeGrid is async : data are not yet loaded when you expand nodes.
Try to add a listener on the grid store and expand nodes on dataChanged event :
pathTree.getTreeStore().addStoreListener(new StoreListener<ModelData>() {
@Override
public void storeDataChanged(StoreEvent<ModelData> se) {
for (ModelData model : pathTree.getTreeStore().getRootItems()) {
pathTree.setExpanded(model, true, true);
}
}
});
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.