flex-users / flexlib

Open Source Flex components library.
github.com/flex-users/flexlib
MIT License
206 stars 88 forks source link

No openAll or expandAll method for TreeGrid #318

Open nicoulaj opened 13 years ago

nicoulaj commented 13 years ago

Originally filed by geertzij...@gmail.com on 2010-07-08T11:57:11

There is no openAllItems or expandAllItems method for a TreeGrid.

Though there is a closeAllItems method.

nicoulaj commented 13 years ago

Updated by pla...@gmail.com on 2010-07-26T13:11:37

I desperately need this too.

nicoulaj commented 13 years ago

Updated by nlokesh...@gmail.com on 2010-12-29T12:20:46

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