The valueCommit event will fire in this case, “change” is only when it was user-interaction that caused the selection, not programmatic changes.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Adam Royle
Sent: Tuesday, October 10, 2006 6:31 PM
To: [email protected]
Subject: [flexcoders] DataGrid change events

 

Hi all,

 

I have implemented a "select-all" functionality for my datagrid when the user presses Ctrl-A. It works, however the change event is not being dispatched when I manually set the selectedIndices, therefore my listeners a not being notified the selection has changed. Is this a bug, or is there a better way to implement something like this?

 

 

<mx:Script>

public function captureDatagridKey(event:KeyboardEvent):void
{
    var a:Array, i:Number;
    if (event.ctrlKey && event.keyCode == 65){
     var num:Number = event.target.dataProvider.length as Number;
     a = [];
     for (i=0;i<num;i++) a[i] = i;
     event.target.selectedIndices = a;
    }

}

</mx:Script>

 

 

 

Cheers,

Adam

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

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

__,_._,___

Reply via email to