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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:13:20+00:00 2026-05-12T19:13:20+00:00

i used advance datagrid of dataProvider as HierarchicalData . it’s an my array collection

  • 0

i used advance datagrid of dataProvider as HierarchicalData . it’s an my array collection strature

private var groupList:ArrayCollection = new ArrayCollection([
               {Country:'India', children:[
                               {Matches:'India Test series 1',isEnable:false},
                               {Matches:'India Test series 2',isEnable:false},
                               {Matches:'India Test series 3',isEnable:false}]},
               {Country:'Australia', children:[
                               {Matches:'Australia Test series 1',isEnable:false},
                               {Matches:'Australia Test series 2',isEnable:false},
                               {Matches:'Australia Test series 3',isEnable:false}]},
               {Country:'japan', children:[
                               {Matches:'Australia Test series 1',isEnable:false},
                               {Matches:'Australia Test series 2',isEnable:false},
                               {Matches:'Australia Test series 3',isEnable:false}]},
              
            ]);

i want to get particular data like matches details and count which one is (isEnable==true) value . so convert HierarchicalCollectionView to Array like

var hCollView:HierarchicalCollectionView = updategrid.dataProvider as HierarchicalCollectionView;

        var hCollData:HierarchicalData = hCollView.source  as HierarchicalData;

        var hArrayColl:ArrayCollection =  hCollData.source as ArrayCollection;

        var hArray:Array = hArrayColl.source as Array;


        for(var i:Number=0;i<hArray.length;i++)
     {


        Alert.show(hArray[i].Country);




        if(hArray[i].isEnable=="true")
        {
                    count1++;

        }


       }

It shows only country details but if i tried matches and isEnable not found in array . How can i found is isEnable and matches details ? Please refer me

  • 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-12T19:13:21+00:00Added an answer on May 12, 2026 at 7:13 pm

    You are still only testing the top level children in your loop. Change it to,

    for( var i : Number = 0; i < hArray.length; i++ ) {
        Alert.show( hArray[i].Country );
        for each ( match : Object in hArray[i].children ) {
            if ( match.isEnable ) {
                count1++;
            }
        }
    }
    

    This way, you are looping through the children of each of the top level objects to reach the match objects.

    You should probably think about making a typed object for both your Country and Match objects, you’ll be able to encapsulate this type of behaviour much easier.

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

Sidebar

Related Questions

I used Jquery to insert a variable to div. Please check my code. var
i used before a datagrid and fixed that issue by overriding the methods but
I know when you know in advance your product will be used in these
Thanks in advance for the help that will be received! I used to use
Apologies in advance, am fairly new to rails. Creating a site to showcase cooking
I'm sorry in advance if this question is flawed. I'm pretty new to databases(I
Thanks in advance.. In my WP7 application I have used following code for zooming
Thanks in advance. I used CGAffineTransformMakeScale(-1.0, 1.0) tranform on an image And i got
Thanks for helping me in advance! I am used to Java and C# but
I apologize in advance for the long post... I used to be able to

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.