1 Reply Latest reply on Nov 11, 2011 9:55 AM by Flex harUI

    Create dropdownlist as item Editor

    Zolotoj Level 3

      I have the following code:

      [Bindable]

                  private var myDP:ArrayCollection = new ArrayCollection([

                      {label1:"Order #2314", quant:3, color:'red'},

                      {label1:"Order #2315", quant:3, color:'red'}    

                  ]);     

      <s:DataGrid id="myDG" width="100%"

                      dataProvider="{myDP}"

                      variableRowHeight="true"

                      editable="true" >

              <s:columns>

                  <s:ArrayList>

                      <s:GridColumn dataField="label1" headerText="Order #"/>

                      <s:GridColumn dataField="quant" headerText="Qty"/>

                      <s:GridColumn dataField="color" headerText="Color">

                          <s:itemEditor>

                              <fx:Component>                           

                                  <s:ComboBoxGridItemEditor enabled="false">

                                      <s:dataProvider>

                                          <s:ArrayList>

                                              <fx:String>red</fx:String>

                                              <fx:String>green</fx:String>

                                              <fx:String>blue</fx:String>

                                          </s:ArrayList>

                                      </s:dataProvider>

                                  </s:ComboBoxGridItemEditor>

                              </fx:Component>

                          </s:itemEditor>   

                      </s:GridColumn>

                      <s:GridColumn headerText="1234" editable="false">

                          <s:itemRenderer>

                              <fx:Component>

                                  <s:GridItemRenderer>

                                      <s:Button/>                               

                                  </s:GridItemRenderer>

                              </fx:Component>   

                          </s:itemRenderer>

                      </s:GridColumn>

                  </s:ArrayList>

              </s:columns>

          </s:DataGrid>

      where I am trying to have a true dropdownlist as an item editor. But, when I run I still can type into the combo.

       

      Thanks