4 Replies Latest reply on Mar 26, 2008 6:04 AM by GerryIsHere

    ComboBox.removeAll() doesn't work!

    GerryIsHere Level 1
      Hi there!

      Despite the use of the ComboBox.removeAll() statement, I find the ComboBox Items List duplicated when I come back to the page where the ComboBox is.
      Can't explain...

      I thank you in advance for your help.

      Best regards,
      Gerry
        • 1. Re: ComboBox.removeAll() doesn't work!
          Level 7
          Gerry,

          > Despite the use of the ComboBox.removeAll() statement, I
          > find the ComboBox Items List duplicated when I come back
          > to the page where the ComboBox is.

          Rest assured, ComboBox.removeAll() works. ;)

          Let's see your code. :)


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: ComboBox.removeAll() doesn't work!
            GerryIsHere Level 1
            Thanks David for your interest!

            Problem solved.
            My eventListener didn't target the right instance of my CB !!!
            Silly of me!

            In the other hand I have other problems I describe in the topic "DataGrid Basic":
            (I hope this isn't to consider as cross-posting...))

            Questions:
            Selecting items in the CBBUY ComboBox send these items as Objects to the DGBUY DataGrid
            DGBUY have one editable column (qte_dgc) where user can change the quantity of each item populating DGBUY
            How do I pull out the data contained in DGBUY with updated quantities?
            Should I turn Objects in DGBUY to Strings?
            And how I extract the quantity from each Object in DGBUY?

            If, by chance, you have some time free...

            Best regards,
            Gerry
            • 3. Re: ComboBox.removeAll() doesn't work!
              Level 7
              Gerry,

              > How do I pull out the data contained in DGBUY with updated quantities?

              I'm not sure I understand what you're asking, but you might find it
              helpful to use the DataGrid.dataProvider property to swap out/update the
              data displayed in your data grid.

              > Should I turn Objects in DGBUY to Strings?
              > And how I extract the quantity from each Object in DGBUY?

              Using a data provider (see "DataProvider API" in the AS2 Components
              Reference) means you can manipulate data separate from the data grid, then
              associate your data provider object with the data grid to see the updates.
              I'm afraid I can't see, in my mind's eye, what you've got going on, though.


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."


              • 4. Re: ComboBox.removeAll() doesn't work!
                GerryIsHere Level 1
                Hi David!

                Hope you spent a better Easter than mine: I was sick...

                I solved all the problems for which I asked questions.
                Smart of me! :-)

                Now I have another problem... :
                DGBUY is my DataGrid
                mydgdp is an array and is the DataProvider of DGBUY

                How can I remove an item I select in DGBUY?
                I tried:
                DGBUY.removeItemAt.selectedItem.index;
                but it doesn't work.

                I thank you in advance for your reply.

                Best,
                Gerry