Your code works, I've attached a simple test file. You just have to make sure that you use
myGrid.addEventListener("cellClick", this);
and not by using the MXML syntax. Otheriwse the compiler will complain
about the fact that DataGrid is not known to dispatch a "cellClick"
event.
BTW, you don't need to add the [Event("cellClick"] metadat to your
CheckCellRenderer class because it's not the CheckCellRenderer that
dispatches the event but the DataGrid.
Dirk.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of xiankevin2005
Sent: Friday, September 09, 2005 3:15 AM
To: [email protected]
Subject: [flexcoders] Re: 3 problems about datagrid ...
thanks for your prompt.
but i think there must be something wrong with my code and the event
"cellClick" cannot be caught by the listener.
when using
myGrid.addEventListener("cellClick", this); or
<mx:DataGrid cellClick="trace('cell was clicked')"/> what i can see on
the sreen is the following:
Unknown attribute 'cellClick' on mx.controls.DataGrid
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
testGrid.mxml
Description: testGrid.mxml
CheckCellRenderer.as
Description: CheckCellRenderer.as

