Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How do I set a treeGrid to expand all nodes programmatically?

    I know I can set the SectionStackSection to setExpanded(true) but I don't see that anywhere in the treeGrid.

    #2
    Use TreeGrid.getData().openAll()

    Use TreeGrid.getData().openAll()
    I'm using a TreeGrid with a client only DataSource and this method works for me, i hope it helps
    Code:
    treeGrid.fetchData(new Criteria(),new DSCallback() {
    
    	@Override
    	public void execute(DSResponse response, Object rawData, DSRequest request) {
    		treeGrid.getData().openAll();
    	}
    });
    passing null object as Criteria or just a new Criteria() produce the same results. I think you must call this method from DSCallback's execute method because fetchData runs asynchronously. If you do it somewhere else, just make sure your data is in place.

    Cheers!
    Last edited by cirovladimir; 10 Nov 2010, 13:22.

    Comment

    Working...
    X