Open GoogleCodeExporter opened 8 years ago
Original comment by dmcc...@gmail.com
on 8 Jan 2009 at 6:06
Try changing your open itemAt method to look like this:
/**
* This method opens up an item at the row # passed in
*
* @return the number of rows added to the display model
* or return 0 if there were no children to open up (and thus no rows were added)
*/
public function openItemAt( rowNum : Number, item : Object = null ) : Number
{
//if there was no item passed in then retrieve it via row number
if ( item == null )
item = ListCollectionView( _displayedModel ).getItemAt( rowNum );
//if the item is not already open
if (!isItemOpen(item))
{
//add the item to the list of open items
var uid : String = itemToUID( item );
_openItems[ uid ] = item;
this.selectedIndex = -1;
//if there are childrent then go and open them up, otherwise skip to the bottom
and return 0
if ( _dataDescriptor.getChildren( item ) )
{
// add the rows for the children at this level
for ( var i : int = 0; i < _dataDescriptor.getChildren( item ).length; i++ )
{
ListCollectionView( _displayedModel ).addItemAt( _dataDescriptor.getChildren(
item )[i], rowNum + i + 1 );
}
var offset:Number = 0;
for ( i = 0; i < _dataDescriptor.getChildren( item ).length; i++ )
{
var vChild:Object = _dataDescriptor.getChildren( item )[ i ];
if ( isItemOpen( vChild ) )
{
offset += openItemAt( rowNum + i + 1 + offset, vChild );
}
}
//return the number of children that were opened
return _dataDescriptor.getChildren( item ).length + offset;
}
}
//if the item was already open then return 0 as well
return 0;
}
Original comment by bdub...@gmail.com
on 19 Feb 2009 at 8:21
see: http://code.google.com/p/flexlib/wiki/FlexBuilderProject about how to
re-compile
your code.
Original comment by bdub...@gmail.com
on 19 Feb 2009 at 8:22
given solution is not working
Original comment by riteshya...@gmail.com
on 23 Mar 2010 at 10:51
Original issue reported on code.google.com by
zhaotia...@gmail.com
on 3 Nov 2008 at 3:34