【问题标题】:Using an inline item renderer to edit my DATAGRID使用内联项渲染器编辑我的 DATAGRID
【发布时间】:2011-02-27 11:57:06
【问题描述】:

晚上好。我的数据网格项目编辑器有问题 这是我的数据网格组件

<mx:DataGrid id="lessonPlanDataGrid" x="10" y="10" dataProvider="{studentLessonPlanArray}" height="271" width="270" editable="true">

<mx:columns>    
<mx:DataGridColumn headerText="Activity Name" dataField="activityname" textAlign="center"/>     
<mx:DataGridColumn headerText="Duration(minutes)" dataField="time" textAlign="center" editable="true">
<mx:itemEditor>
<fx:Component>              
<mx:NumericStepper stepSize="1" maximum="20"/>

</fx:Component>

</mx:itemEditor>    

</mx:DataGridColumn>

</mx:columns>

</mx:DataGrid>

每当我更改值时,它都会给我这个错误

Error #1069: Property text not found on Forms.LessonPlanInnerClass0 and there is no default value.
    at mx.controls::DataGrid/itemEditorItemEditEndHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\controls\DataGrid.as:5296]
    at flash.events::EventDispatcher/dispatchEventFunction()

数组 StudentLessonPlanArray 是一个可绑定数组

请帮帮我

【问题讨论】:

    标签: apache-flex flex4


    【解决方案1】:

    尝试使用自定义 itemEditor 将 DataGridColumn 上的 editorDataField 设置为“值”。这个属性告诉 Flex 哪个属性包含编辑结束时应该应用的值。默认项目编辑器为 TextInput,因此 editorDataField 的默认值为 'text'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-03
      • 1970-01-01
      • 2011-07-15
      • 1970-01-01
      • 2019-10-05
      • 1970-01-01
      • 2011-06-20
      • 1970-01-01
      相关资源
      最近更新 更多