wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

No openAll or expandAll method for TreeGrid #318

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
There is no openAllItems or expandAllItems method for a TreeGrid.

Though there is a closeAllItems method.

Original issue reported on code.google.com by geertzij...@gmail.com on 8 Jul 2010 at 11:57

GoogleCodeExporter commented 8 years ago
I desperately need this too.

Original comment by pla...@gmail.com on 26 Jul 2010 at 1:11

GoogleCodeExporter commented 8 years ago
I added a method to expand all the items in TreeGrid,
code:
public function expandAll():void{
    //to store the item
    var item:Object;

    for(var i:int =0 ; i< _displayedModel.length; i++){
    item = _displayedModel.getItemAt(i);

    //open the collection if there are any child collection
    if(_dataDescriptor.getChildren(item) != null)
          openItemAt(i,item);

    }
}

The above code worked for me. Can this be added to TreeGrid class?

Thanks,
Lokesh

Original comment by nlokesh...@gmail.com on 29 Dec 2010 at 12:20