4 Replies Latest reply on Mar 3, 2010 7:11 AM by kminKeller-si5I0P

    List missing some ID values

    kminKeller-si5I0P Level 1

      I have a list that I populate from a data provider. data provider is an arraycollection of an object A whose fields are id, name, date etc. I bind the data to the list. Everything looks fine but the weird thing is that some of the id fields are left blank. and these are usually in the multiples of 10. for example, i am missing id for the 10, 20, 30, 40 and so on....


      this is very bizarre situation that i am facing. when i debug my code, i see all the id fields been populated from the backend service properly. any suggestion or idea would be highly appreciated. Thanks.

        • 1. Re: List missing some ID values
          Gregory Lafrance Level 6

          This code works. How does your code differ in significant ways?


          <?xml version="1.0"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
                import mx.collections.ArrayCollection;
                [Bindable] private var ac:ArrayCollection = new ArrayCollection([
                  {id: 1, label: "test1"},
                  {id: 20, label: "test20"},
                  {id: 3, label: "test3"},
                  {id: 40, label: "test40"}
            <mx:List dataProvider="{ac}">
                    <mx:Label text="{data.id}"/>
                    <mx:Label text="{data.label}"/>

          If this post answers your question or helps, please mark it as such.

          Greg Lafrance - Flex 2 and 3 ACE certified


          Flex / AIR Development, Training, and Support Services

          • 2. Re: List missing some ID values
            kminKeller-si5I0P Level 1

            Yes, that works fine and I have many instances I do not have any problem with. But sometime Flex behaves weird. I get all the ids but it some how does not display few of those as I have mentioned before. I print out all the ids on the eventHandler when I get the response back and I see all the ids there too. But some of those dont get displayed on the UI. I am just wondering if it some kind of bug on Flex.

            • 3. Re: List missing some ID values
              Flex harUI Adobe Employee

              Are you using a custom itemRenderer?

              • 4. Re: List missing some ID values
                kminKeller-si5I0P Level 1

                Yes I was using custom renderer. And I think I found the issue. it was the padding that I was using. but weird thing is it only hides the characters like 10, 20, 30 and so on. i have id that are like 300s and 400s and this can grow as much as thousands. I am just not sure why the padding is causing to hide the entire characters. I would think it should just truncate the characters. anyways, i have the issue resolved at the moment. but if any of you guy can clarify would be great to know. thanks.