2 Replies Latest reply on Dec 15, 2010 1:04 AM by paolo.anghileri

    Name-value pairs in item editor


      I am setting up a datagrid that must have in some fields an itemEditor displaying a combobox with name/value pairs:


          <mx:DataGrid height="100%" width="100%" id="dgTaxa" editable="true">
                                  <mx:DataGridColumn headerText="Codice" dataField="taxonCode" width="60"/>
                                  <mx:DataGridColumn id="colFamily" headerText="Famiglia" dataField="family" width="80">
                                              <mx:ComboBox width="80" labelField="familyId" dataProvider="{parentDocument.families}" >


      This combobox has a dataprovider that it's this one:


      public var families:ArrayCollection = new ArrayCollection([
              { familyId:1, name:"cactacee"},
              { familyId:2, name:"liliacee"}


      My problem is that I want to show name as combobox labels, but get familyId as combobox values to send back to the webservice.


      Does anyone know how to help me?