使用内联项目渲染器编辑我的 DATAGRID
晚上好。我的数据网格项目编辑器有问题 这是我的数据网格组件
<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 是一个可绑定数组
请帮助我
Good evening. I have a problem in my datagrid itemeditor
This is my data grid component
<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>
Whenever i change the value it gives me this error
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()
the array StudentLessonPlanArray is a bindable array
Please Help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用自定义 itemEditor 将 DataGridColumn 上的 editorDataField 设置为“值”。此属性告诉 Flex 哪个属性包含编辑结束时应应用的值。默认项目编辑器是 TextInput,因此 editorDataField 的默认值为“text”
Try setting editorDataField to 'value' on the DataGridColumn with the custom itemEditor. This property tells Flex which property contains the value that should be applied when editing ends. The default item editor is TextInput, and so the default value for editorDataField is 'text'