You could make the CheckCellRenderer dispatch an event on the DataGrid, i.e. inside your CheckCellRenderer:
<mx:CheckBox click="listOwner.dispatchEvent({type: 'cellClick', row: getCellIndex().itemIndex})" /> This will make the DataGrid dispatch a "cellClick" event. To listen to this event you'll need to add an event listener on the DataGrid myGrid.addEventListener("cellClick", this); The clicked row will be available in the event object passed to the cellClick function, e.g. function cellClick(event:Object):Void { mx.controls.Alert.show("Row clicked: " + event.row); } Dirk. -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of xiankevin2005 Sent: Thursday, September 08, 2005 1:21 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: 3 problems about datagrid ... thanks for the reply...let me describe the problem i'm facing. assume that the dategrid is a song list with several pages and i use a CheckCellRenderer for a column.when user clicks the check box,the song will add to his play list and remove it for another click. i want to create a click handler in the mxml file,which functions to watch all the check boxes,and when one of them is clicked,i can get the number of the row.then append the selected song to the play list. i used to add some code in the click handler in CheckCellRenderer.as.like this: if(check.checked) listOwner._parent.addToPlayList(getCellIndex().itemIndex); else listOwner._parent.delFromPlayList(getCellIndex().itemIndex); it seems strange though can work properly... how can i do? about problem 3: to add a "..." is just what i want.but how to implement this cell renderer?i've no idea...any prompt would be appreciated... thanks a lot. kevin ------------------------ 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 ------------------------ 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/