0 Replies Latest reply on Apr 25, 2012 6:07 AM by diana.c10

    ComboBox as DataGrid cell

    diana.c10

      Hi all,

       

      I am trying to make a data grid cell a combo box, which would take the values from the dataField of the dataGrid cell.

       

      Let me show what I have so far:

       

      <mx:DataGrid id="objGrid" width="100%" height="100%" allowMultipleSelection="true"

                                >

      <mx:DataGridColumn id="comboCell"  dataField="_list"

                                         editable="true">

                          <mx:itemEditor>

                              <mx:Component>

                                  <mx:ComboBox  >

                                     

                                  </mx:ComboBox>

                              </mx:Component>

                          </mx:itemEditor>

                      </mx:DataGridColumn>

      </mx:DataGrid>

       

      The objGrid is a list of objects of type A let's say, and class A has a field _list which is of type Array. If I put it like this the items from the array will be printed in the cell as a string. I can see that the comboBox has itself a dataProvider but how can I tell it that the data provider is actually the current dataField as an Array?

       

      Thanks,