Click here to Skip to main content
14,733,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..
i am using below code to select/deselect all checkbox in datagrid
<mx:datagridcolumn id="testColumn" width="20" sortable="false" xmlns:mx="#unknown">
	<mx:headerrenderer>
		<fx:component xmlns:fx="#unknown">
			<mx:canvas>
			<fx:script>
				<![CDATA[
					protected function checkAll_clickHandle(event:MouseEvent):void
						{
					
						}	
					
			</fx:script>
				<s:checkbox id="checkAll" horizontalcenter="0" selected="false" click="checkAll_clickHandler(event)" xmlns:s="#unknown" />
			</mx:canvas>
		</fx:component>
	</mx:headerrenderer>	 	
	<mx:itemrenderer>
		<fx:component xmlns:fx="#unknown">
			<mx:canvas width="100%" height="100%">
			<fx:script>
				<![CDATA[
					protected function check_clickHandler(event:MouseEvent):void
						{
					data.isSelected = (event.currentTarget as CheckBox).selected;
						if(data.isSelected == false)
							{
							}
						}	
					
			</fx:script>
				<s:checkbox id="check" horizontalcenter="0" selected="{data.isSelected}" click="check_clickHandler(event)" xmlns:s="#unknown">
				</s:checkbox>
			</mx:canvas>
		</fx:component>
	</mx:itemrenderer>
</mx:datagridcolumn>

i want to unselct checkAll checkbox when i deselect any of row checkbox, i am trying to access value of checkAll to check_clickHandler(), but i am not getting its value.
how can i do this??
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900