Hi -
I'm having a problem with an AdvancedDataGrid that has a DataGrid as a
renderProvider. My dataProvider for the ADG is an ArrayCollection of the below
object.
[Bindable]
public class MyRecord implements ValueObject
{
public var recall_id:int;
public var recall_type:String;
public var selected:Boolean = false;
public var qty:Number;
public var curr_qty:Number;
public var due_date:String;
public var status:String;
public var comments:String;
public var groupedTrades:ArrayCollection = new ArrayCollection();
}
<mx:dataProvider>
<mx:HierarchicalData
source="{model.recalls}"
childrenField="groupedTrades"/>
</mx:dataProvider>
Here's my renderProvider code:
<mx:rendererProviders>
<mx:AdvancedDataGridRendererProvider
depth="2"
columnIndex="1"
renderer="com.controls.GroupedTradesGrid"
columnSpan="0"/>
</mx:rendererProviders>
In this GroupedTradesGrid I override this method to set the dataProvider:
override public function set data(value:Object):void
{
// If using the array data source, use this instead:
trades_dg.dataProvider = value;
}
The problem is that my renderProvider's method is invoked for every record in
the dataProvider of the ADG it is part of. This amounts to a brand new DataGrid
for each trade in groupedTrades...instead of 1 DataGrid that has all trades.
I'm very frustrated as I've asked around on other forums and can't seem to get
a response. Anyone have any ideas? I'm kind of at my wits end.
Thank you for any helpful tipsF!
How do I resolve this? I'm perplexed.