In my project i used one select all button for select all checkbox at click event . But i used datagrid ,iteam renderer within checkbox so no id of checkbox then how to select/unselect all checkbox ?
<mx:DataGrid id=newdatagrid>
<mx:columns>
<mx:DataGridColumn headerText="1" rendererIsEditor="true" editorDataField="selected">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox click="{data.check1 = (data.check1 != 'true') ? 'true' : 'false'};outerDocument.toggleCheckbox(data);outerDocument.calcValues();" dataChange="this.selected=outerDocument.validateCheckbox(data)"/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
how can i implement select/unselect all button for checkbox?