Yes, that's true. When assingning event handlers in MXML, the Flex compiler looks for the Metadata tags defined in the different classes when compiling a SWF. Due to the fact that the "cellClick" event is not defined inside the DataGrid class, the compiler complains.
If you want, you could create a subclass of mx.controls.DataGrid and define a [Event("cellClick")] in this subclass. Then, when you use your DataGrid subclass in your MXML code, you'll be able to write <yourNamespace:DataGridSubclass cellClick="doSomething(event)" /> Dirk. -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of xiankevin2005 Sent: Friday, September 09, 2005 3:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: 3 problems about datagrid ... sorry for my neglect... the way that using myGrid.addEventListener("cellClick", this) works correctly.but it seems that i cannot use the event handler cellClick directly in the mx:DataGrid tag. thank you very much! ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/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/