1 Reply Latest reply on Jul 20, 2008 9:44 PM by fizbeam

    Dependent ComboBox

    hlship
      Just getting started with Flex (actually Flex 3).

      I have a situation where I have two combo boxes. I need to select a primary value and a secondary value from a list of values.

      Whatever you select as primary should be excluded from the secondary combobox.

      The values to be chosen are stored in an ArrayCollection.

      What is the normal idiom for this kind of thing? Do I need to populate a 2nd ArrayCollection for the secondary combobox? Is there a way I can chain the 1st ArrayCollection with a filter (I've seen something like that in the docs for ArrayCollection).

      Thanks for pointers and examples,

      Howard
        • 1. Re: Dependent ComboBox
          fizbeam
          You can do this by filtering the dataprovider for your secondary combobox. If the dataprovider is an array you can use array.filter() and if it's an arraycollection you can set array.filterFunction. Here's a really simple example with two comboboxes, the first with states and the second with cities.