views:

115

answers:

3

Hi All,

I am using a custom itemEditor for my DataGrid. The itemEditor has a simple TextField as a component. But when ever i am clicking the cell i am getting an error as : ReferenceError: Error #1069: Property text not found on editors.customItemEditor and there is no default value. at mx.controls::DataGrid/itemEditorItemEditEndHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\DataGrid.as:4827]

Plz help me to resolve this issue.

My Opinion is that the error is coming for the "text" field. But i havn't accessed "text" field or used it anywhere in my code.

Regards, Ravi

A: 

Taken from http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.html

By default, Flex expects an item editor to return a single value to the list-based control. You use the editorDataField property of the list-based control to specify the property of the item editor that contains the new data. Flex converts the value to the appropriate data type for the cell.

The default item editor is a TextInput control. Therefore, the default value of the editorDataField property is "text", which corresponds to the text property of the TextInput control. If you specify a custom item editor, you also set the editorDataField property to the appropriate property of the item editor
2DH
A: 

Thanks 2DH,

But, even if i am using editorDataField = "value", i m getting this error. ReferenceError: Error #1069: Property value not found on editors.customItemEditor and there is no default value. at mx.controls::DataGrid/itemEditorItemEditEndHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\DataGrid.as:4827]

Can you suggest any thing else that might be missing.

P.S. I am writing my whole code in ActionScript.

Ravi Ranjan
Could you paste your editorItemRenderer class code. It probably doesn't have 'value' property defined and that's causing the problem.
2DH
A: 

I am still Struck in this error but i think there is a hope of coming out of it.... :)

If we take TextInput as the itemEditor, like:

dataGridColumn.itemEditor = new ClassFactory(TextInput);

Then there was no problem as "text" is being internally defined inside TextInput.as. On a similar note if i copy set text and get text inside our custom Editor, then its working fine.. only problem that is coming is regarding commiting the changed values.

I am working on it, hope i'll be able to sort it out.

P.S.: I am a newbie here, so plz pardon me of any idiotic RnD... :p

Ravi Ranjan