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:Da开发者_JAVA百科taGrid>
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
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'
精彩评论