DataGrid 使用ComboBox

来源:互联网 发布:php 打开xlsx文件乱码 编辑:程序博客网 时间:2024/05/16 04:19

DataGrid 使用ComboBox:

<mx:DataGrid id="varGrid" x="0" y="0" dataProvider="{processVarDatas}" editable="true" width="100%" height="153">
        <mx:columns>
            <mx:DataGridColumn headerText="Name" dataField="id" editable="true"/>
            <mx:DataGridColumn headerText="Type" dataField="dataType" editable="true" editorDataField="value">
                <mx:itemEditor>
                    <mx:Component>
                        <mx:ComboBox width="100%">
                          <mx:ArrayCollection>
                               <mx:Object label="String" data="STRING"/>
                               <mx:Object label="Integer" data="INTEGER"/>
                             <mx:Object label="Float" data="FLOAT"/>
                          </mx:ArrayCollection>
                           </mx:ComboBox>
                    </mx:Component>
                </mx:itemEditor>
            </mx:DataGridColumn>
        </mx:columns>
    </mx:DataGrid>