Hi,

Had this issue myself... works when you provide the full namespace in your itemRenderer (whether it's imported or not, or even sitting in the same directory)...

itemRenderer="my.path.to.DataListItem"

Hope that helps,

Brendan

On 6/9/06, polestar11 <[EMAIL PROTECTED]> wrote:

Hi there

I am using a datagrid with an itemRenderer component for one of the
columns. I have never been able to get this to work in Flex2Beta3,
always getting the error:
Definition (my component) could not be found. [CODEGEN ... (path to my
file)]

If I use the component outside of a datagrid itemRenderer I dont get
any compilation error.

Here is the actual code example ...

.mxml file containing the datagrid:
-------------------------------------
<mx:Canvas label="My Canvas" width="408" height="154">
<mx:DataGrid x="-1" y="0" id="dataList"
dataProvider="{model.dataList}">
<mx:columns>
<mx:DataGridColumn headerText="Col 1" dataField="col1" />
<mx:DataGridColumn headerText="Col 2" itemRenderer="DataListItem" />
</mx:columns>
</mx:DataGrid>
</mx:Canvas>

DataListItem.mxml file containing the component:
-------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="80"
height="20">
<mx:HBox>

<mx:Label text="{data.number}" />
<mx:Label text="{data.textVal}" />

</mx:HBox>
</mx:Canvas>


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to