mardi 22 décembre 2015

AdvancedDatagrid and itemEditor: Value disappears when clicked

I'm trying to use a ComboBox as itemEditor in an AdvancedDatagrid. Both the grid and the comboBox fills up with values. But when I click in a cell the value disappears. Have I missed a property, or do I have to write an explicit itemEditor to copy the value to and from the itemEditor?

Full code:

<?xml version="1.0"?>
<!-- dpcontrols\ArrayCollectionInAS.mxml -->
<s:Application xmlns:fx="" 

        import mx.collections.*;
        [Bindable] public var stateArray:ArrayCollection;

        public function initCB():void {
            stateArray=new ArrayCollection([{label:"AL", data:"Montgomery"},
                                      {label:"AK", data:"Juneau"},
                                      {label:"AR", data:"Little Rock"}]);

        [Bindable] public var initDG:ArrayCollection = new ArrayCollection([{etikett:'NY', tekst:"New York"}, {etikett:'LA', tekst:"Los Angeles"}]);

<mx:AdvancedDataGrid id="gridIntMapping" y="24" left="10" right="605" height="166" editable="true" dataProvider="{initDG}">
            <mx:AdvancedDataGridColumn width="130" dataField="etikett" headerText="Skjema referanse" editorDataField="text">
                        <mx:ComboBox editable="true" dataProvider="{outerDocument.stateArray}" labelField="label"/>

Aucun commentaire:

Enregistrer un commentaire