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

  • Home
  • SEARCH
  • 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 6169881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:55:59+00:00 2026-05-23T22:55:59+00:00

In my Flex project, I have a service function getItems() that returns me a

  • 0

In my Flex project, I have a service function getItems() that returns me a collection/array of Item objects.

The function runs an SQL statement like SELECT * FROM table. I therefore do not want to use a SELECT COUNT SQL statement.

I know that if I use a Flex spark:DataGrid, I can easily get the length of the datagrid to know the number of rows (which in my case, would be the number of objects returned by my getItems() function). However, I am using an mx:AdvancedDataGrid and it is not possible to get the length by the same means as with the spark:DataGrid.

Actually, I need to dynamically create a set of labels with text={ItemName}. Using a Vbox and a for loop, I am able to create a list of labels. At the moment, I have a random number for the delimiter in my for loop. I just need to get the number of objects returned by my getItems() function. I can then put that number in the for loop and the job is done.

At least, this is how I plan to do this task.

Is there a better way to do this?

PS: I have Googled extensively, but I could not find any working examples for what I want to do.

Suggestions are welcome and StackOverflow is fabulous!

[EDIT] I eventually used an mx:Repeater to do the task described above.

  • 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-23T22:56:00+00:00Added an answer on May 23, 2026 at 10:56 pm

    how about this:

    private function getItemsResultHandler(event:ResultEvent):void
    {
        var items:ArrayCollection = new ArrayCollection();
        items = event.result as ArrayCollection;
    
        trace(items.length);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a Flex project, I have an array with objects in it. I want
So, I have Flex project that loads a Module using the ModuleManager - not
I am starting a web application project that will have an Adobe Flex front-end
We have a Flex client and a server that is using the Spring/Blazeds project.
I have a Flex project that I need to work on that using some
I have a flex project with a mx:Text. i have a class that is
I have a flex project that is made of up several custom components that
I have an ActionScript only Flex project that was written by someone else. I
In my Flex Project using Cairngorm, I have a model that stores a bindable
I have a convenience collection class in my Flex project called HashMap, which is

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.