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 8179679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:03:18+00:00 2026-06-07T00:03:18+00:00

My question is, how can do I take this Multi Dim array collection and

  • 0

My question is, how can do I take this Multi Dim array collection and apply level 2 to a drop down list,

 var someArray:ArrayCollection = new ArrayCollection( [
        { label: "Level 1 p1", data: 
         { label: "Level 2", data: "some stuff" }
        },
        { label: "Level 1 p2", data: 
         { label: "Level 2", data: "some stuff" }
        }
    ] );

<s:DropDownList includeIn="items" id="classSelect" dataProvider="{someArray[0].data}" selectedIndex="0" labelField="label" x="405" y="150"/>

someArray[0].data – for example points it to the entry 1 and the contents of the data level which in turn is a arrayList again, is my understanding here of how the pointers are working incorrect?

  • 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-06-07T00:03:19+00:00Added an answer on June 7, 2026 at 12:03 am

    I’m not sure what you mean by

    Apply level 2 to a drop down list

    If you want to display the level 2 text in the drop down you can do so with an itemRenderer or a labelFunction which drills down into the object to return the text. Conceptually something like this:

    protected function getLevel2(item:Object):String{
      return item.data.label;
    }
    
    <s:DropDownList dataProvider="{someArray}" labelFunction="getLevel2" />
    

    If you want the dataProvider to contain nothing but your nested objects, then you’ll have to loop over the someArray value and create a new collection containing only the level 2 objects. Conceptually like this:

    var newDataProvider :ArrayCollection = new AryCollection();
    for each (item in someArray){
     newDataProvider.addItem(item.data);
    }
    

    I’ll also add, as a point of clarification that your current setting of the dataProvider most likely provides a error because your ‘data’ is a generic object which does implement the IList interface.

    <s:DropDownList dataProvider="{someArray[0].data}" />
    

    If it did work, then you’d end up with a dataProvider that only has a single item in it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question can be boiled down to, where does the string returned from stringstream.str().c_str()
I know this question can be answered by searching in google. But I have
I apologize before hand if this is an obvious question: can Apache 2.0 +
I asked a question about different testing frameworks yesterday. This question can be found
I have not been able to find any definitive answers to this question: Can
I am using the SQL Server PHP Driver, I think this question can be
<hyperbole> Whoever answers this question can claim credit for solving the world's most challenging
I saw this similar question here but can't figure out how to use Contains
I think this is a multi-part question, so bear with me. Currently all of
This is a question about which general approach to take, so I haven't included

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.