in the following code, which I copied out of the livedocs and modified to throw an alert when the itemEditEnd event is fired, it seems that every time the cell you are editing loses focus, the event gets kicked off 5 times, the first 4 times with a reason of "other" and the last with "new_column". What am I missing. I'm trying to kick off code when a cell is changed, but I do not want it to run 5 times. Thanks.
Robert
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*"> <mx:Script>
<![CDATA[ import mx.controls.TextInput; import mx.events.DataGridEvent; import mx.controls.Alert; import mx.utils.ObjectUtil; private var initDG:Array = [ {Company: 'Acme', Contact: 'Bob Jones', Phone: '413-555-1212', City: 'Boston', State: 'MA'}, {Company: 'Allied', Contact: 'Jane Smith', Phone: '617-555-3434', City: 'SanFrancisco', State: 'CA'} ]; public function validateData(event:DataGridEvent):void { Alert.show(ObjectUtil.toString(event.reason)); } ]]> </mx:Script> <mx:DataGrid id="myGrid" dataProvider="{initDG}" editable="true" itemEditEnd="validateData(event)"> <mx:columns> <mx:DataGridColumn dataField="Company" editable="false"/> <mx:DataGridColumn dataField="Contact"/> <mx:DataGridColumn dataField="Phone"/> <mx:DataGridColumn dataField="City"/> <mx:DataGridColumn dataField="State"/> </mx:columns> </mx:DataGrid> </mx:Application> ** Confidentiality Notice: This e-mail and any files transmitted with it are confidential to the extent permitted by law and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the originator of the message and destroy all copies. ** __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |