Welcome, Guest
  • Author Topic: How do I display a total # of records  (Read 2551 times)

    drewbkilla

    • Server what's that
    • *
    • Posts: 2
      • View Profile
      • Email
    How do I display a total # of records
    « on: 04/23/08, 08:46 »
    Hey guys, 

    Im fairly new with Flex 3 Builder, but already loving it. 

    I have a simple report with a datagrid, pie chart and a first/last name search, all pulling from an ASP page that reads a simple XML string. 

    My one complete confusion is when I generate the XML string for flex to read,  Do I also feed in the total amount of records in a string or can Flex run it's own count and display the # on a label?

    I tried the first option but Im unable to bind live data to a label or text field.  I know im missing something really simple becasue showing the amount of records in a query shouldnt be this tough.   Any clues as to what I can do to get this done would be greatly appreciated!

    And I'm sorry if this subject has already been explained on here.

    Thanks!

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: How do I display a total # of records
    « Reply #1 on: 04/23/08, 14:28 »
    Flex will not count automatically, but you can show in the textfield trough binding. USually you build an ArrayCollection and bind with something like this:

    <mx:DataGrid id="dg" dataProvider="{contacts}" editable="true">

    The length of the ArrayCollection is the total of items.

    Jorge

    drewbkilla

    • Server what's that
    • *
    • Posts: 2
      • View Profile
      • Email
    Re: How do I display a total # of records
    « Reply #2 on: 04/23/08, 14:56 »
    Very good!  I will try that and see what I get..     Thanks alot for the RE!   : )