Have the renderer dispatch a bubbling event on change of the checkbox. In the handler, you can access the item, and get the item index and the checked state. Use that to set the selectedIndex on the DataGrid.
Of course the usual itemRenderer recycling caveats apply. Tracy Spratt Lariat Services Flex development bandwidth available ________________________________ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markflex2007 Sent: Friday, January 30, 2009 10:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] checkbox itemEditor in DataGrid Hi, I have add a checkbox itemEditor in DataGrid, I want to make current row selected when I select the checkbox. Please give me a deal how to do that. Thanks you for your help Mark my current code <mx:DataGrid x="531" y="273" editable="true" dataProvider="{inventoryDB}"> <mx:DataGridColumn headerText="Selection" dataField="mySelectin" labelFunction="selectLabeler" itemEditor="mx.controls.CheckBox" editorDataField="selected" width="80"/> </mx:DataGrid> private function selectLabeler( item:Object, col:* ) : String { if(item.mySelectin == ""){ item.mySelectin = false; } return item.mySelectin ? "Yes" : "Not"; }