View Full Version : problem with component itemEditor

12-03-2008, 11:18 PM
I've built a custom MXML component called StatusCB which based on an HBox and has a ComboBox inside of it. I'm trying to use it as the itemEditor for one of the columns in a DataGrid.
The dataGridColumn in question looks like this:
<mx:DataGridColumn headerText="Status" dataField="status" editable="true" itemEditor="StatusCB" editorDataField="newStatus"/>

StatusCB.mxml is in the same directory as the file that contains the dataGrid, but I get an error with the following message on the line with that DataGridColumn:
Definition StatusCB Could Not Be Found

Is there something more I need to do to reference that file? do I need to create an xmlns for the directory I'm in?
Thanks in advance.

Peter Cowling
12-03-2008, 11:39 PM

It is dot notation to reference the itemEditor direct, so:


Similarly, you can reference core components the same way:


12-04-2008, 12:01 AM
Hi Peter,
I realize it's dot notation for an itemEditor in a subdirectory, but mine is in the same directory as the file that has the DataGrid that's referencing it. I thought that under those conditions, I just need to specify the file name itself (minus the extension).
so the path to the file holding the DataGrid is something like project/src/components/datagridfile.mxml
and the path to the StatusCB (the custom itemeditor) is project/src/components/StatusCB.mxml

Thanks again.

Peter Cowling
12-04-2008, 12:09 AM
So components.StatusCB should do the trick.

12-04-2008, 01:25 AM
Right you are.
Thanks again.