Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6893163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:37:30+00:00 2026-05-27T06:37:30+00:00

I have an object that looks like this: [Bindable] public class MyRecord implements ValueObject

  • 0

I have an object that looks like this:

[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();
}

I stuff a bunch of those in an ArrayCollection and then I use this as a dataProvider for an AdvancedDataGrid:

<mx:dataProvider>       

                                <mx:HierarchicalData 
                                    source="{model.recalls}"
                                    childrenField="groupedTrades"/>      

                            </mx:dataProvider>

I have an AdvancedDataGridRenderProvider that I want to display my ‘groupedtrades’:

<mx:rendererProviders>

                                <mx:AdvancedDataGridRendererProvider 
                                    depth="2" 
                                    columnIndex="1" 
                                    renderer="com.controls.GroupedTradesGrid"
                                    columnSpan="0"/>

                            </mx:rendererProviders> 

In this renderProvider I override the set data function 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.

How do I resolve this? I’m perplexed.

Thanks for any helpful tips, and Happy Thanksgiving!

UPDATE: I just found some hardcoded array from a blog that is doing what I want; a DataGrid as a renderProvider of an AdvancedDataGrid.

private var masterData:Array = [
        { OrderId: 10248, CustomerId:"WILMK", EmployeeId:5, OrderDate:"1-Feb-2007", 
        children:[
                [
                    {ProductId:11, ProductName:"Quesbo Cabrales", UnitPrice:14, Quantity:12, Discount:0, Price:168},
                    {ProductId:42, ProductName:"Singaporean Hokkien Fried Mee", UnitPrice:9.8, Quantity:10, Discount:0, Price:98},
                    {ProductId:42, ProductName:"Mozzarella di Giovanni", UnitPrice:34.8, Quantity:5, Discount:0, Price:174}
                ]
                ]}
             ]
         ]}

This is from this blog: http://techrays.wordpress.com/2008/04/07/advanced-datagrid-as-an-item-renderer-within-an-advanced-datagrid/#comment-1511

When I debug my collection (recalls is the arraycollection i use) as it is returned from the server I am seeing something like this:

recalls[0] – RecallRecord object
– prop
– prop
– groupedTrades – ArrayCollection that I want to use as DP for renderProvider
groupedTrades[0] – Generic Object
groupedTrades[1] – Generic object

I fail to see the difference between the hardcoded version from the blog that works and the data I’m using from my service. What am I missing?

thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:37:30+00:00Added an answer on May 27, 2026 at 6:37 am

    SOLVED:

    It turns out that the problem was how I assigned the values to ‘groupedTrades’ when the server responded. I was doing it totally wrong: I was doing a direct assignment instead of adding the ArrayCollection as an element to the ‘groupedTrades’ ArrayCollection.

    I was doing this:

    for ( var i:int=0;i<result.length;i++ ){
                    var item:Object = result[i];
    
                    var recall:RecallRecord       = new RecallRecord();
                    recall.counterparty_shortcode = item.counterparty_shortcode;
                    recall.comments               = item.comments;
                    recall.curr_qty               = item.curr_qty;
                    recall.div_percent            = item.div_percent;
                    recall.due_date               = df.format( item.due_date );
                    recall.qty                    = item.qty;
                    recall.rebate_rate            = item.rebate_rate;
                    recall.recall_id              = item.recall_id;
                    recall.recall_type            = item.recall_type;
                    recall.sedol                  = item.sedol;
                    recall.status                 = item.status;
                    recall.ticker                 = item.ticker;
                    recall.groupedTrades          = item.groupedTrades;
    
    
                    model.recalls.addItem( recall );
                }
    

    Instead of this:

    for ( var i:int=0;i<result.length;i++ ){
                    var item:Object = result[i];
    
                    var recall:RecallRecord       = new RecallRecord();
                    recall.counterparty_shortcode = item.counterparty_shortcode;
                    recall.comments               = item.comments;
                    recall.curr_qty               = item.curr_qty;
                    recall.div_percent            = item.div_percent;
                    recall.due_date               = df.format( item.due_date );
                    recall.qty                    = item.qty;
                    recall.rebate_rate            = item.rebate_rate;
                    recall.recall_id              = item.recall_id;
                    recall.recall_type            = item.recall_type;
                    recall.sedol                  = item.sedol;
                    recall.status                 = item.status;
                    recall.ticker                 = item.ticker;
    
                    recall.groupedTrades.addItem( item.groupedTrades );
    
                    model.recalls.addItem( recall );
                }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object that looks like this: class Model { public string Category
I have a source object that looks like this: private class SourceObject { public
I have a Document object that looks like this: public class Document { public
I have an object that looks like this: public MyObject { public int ObjectID
I have an object graph that looks like this: class A () { int
Let's say I have an object MyObject that looks like this: public class MyObject
I have an object that looks something like this: public class Student { public
I have an object model that looks like this: public class MyObjectModel { public
I have an object structure that looks like this: var Results = new List<ResultObj>()
I have a JavaScript object that looks something like this: var myTextOptions = {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.