<?xml version="1.0" encoding="utf-8" ?> <mx:Canvasxmlns:mx="http://www.adobe.com/2006/mxml" horizontalScrollPolicy="off" textAlign="center"><mx:Script><![CDATA[ importmx.controls.Alert;importmx.collections.*;importflash.events.Event;importmx.controls.DataGrid;overridepublicfunctionsetdata(value:Object):void{ { chkId.selected= chkId.selected= } }if(value != null)super.data = value;if(value.FLAG == 'Y')true;elseif(value.FLAG == 'N')false;publicfunctionchangeHandler(): void{ data.FLAG= data.FLAG= } ]]> if(chkId.selected == true)'Y';elseif(chkId.selected == false)'N'; </mx:Script><mx:HBoxwidth="50" verticalAlign="middle" horizontalAlign="center"><mx:CheckBoxid="chkId" label="" textAlign="center" change="changeHandler();" selected="false" /><!--<mx:Label text="Delete" color="blue"/>--> Use the FLAG field in arraycollection for preselecting or selecting after wards. thanks vin
________________________________ From: "[email protected]" <[email protected]> To: discussion <[email protected]> Sent: Friday, July 10, 2009 2:59:35 PM Subject: [AFFUG Discuss] Trick to using checkbox in datagrid? Is there a trick to using a drop-in item renderer (checkbox) in a datagrid? I followed the example in the livedocs, but can't seem to get the value of the checkbox back out for processing. Here's the column from the datagrid: <mx:DataGridColumn headerText="" sortable="false" dataField="ATC_CHECKBOX" itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" editorDataField="selected" editable="true" width="14" /> I am able to get the "regular" column values, just not the checkbox. -- Andy Fox Systems Analyst III Georgia Tech OIT-EIS 404-894-4413 ------------------------------------------------------------- To unsubscribe from this list, simply email the list with unsubscribe in the subject line For more info, see http://www.affug.com Archive @ http://www.mail-archive.com/discussion%40affug.com/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- </mx:HBox></mx:Canvas> ------------------------------------------------------------- To unsubscribe from this list, simply email the list with unsubscribe in the subject line For more info, see http://www.affug.com Archive @ http://www.mail-archive.com/discussion%40affug.com/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
