What are you trying to do with the line?: AdvancedDataGrid(event.currentTarget).selectedIndex = event.rowIndex;
As it is is sets the selectedIndex to itself. rowIndex is the selectedIndex. Tracy Spratt, Lariat Services, development services available _____ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of lehaianh1986 Sent: Monday, March 30, 2009 10:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AdvancedDatagrid Yeah I see. Thank you very much. I still have small question To give index of row I use AdvancedDataGrid(event.currentTarget).selectedIndex = event.rowIndex; But to give data of it, how do I do? --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, "Tim Hoff" <timh...@...> wrote: > > > Missed the return void. > > private function myEventHandler( event:ListEvent ):void > { > // do something > } > > -TH > > --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, "Tim Hoff" <TimHoff@> wrote: > > > > > > Just a syntax problem. Should be like this: > > > > var client:AdvancedDataGrid = new AdvancedDataGrid; > > client.dataProvider = ArrayResults; > > client.addEventListener( ListEvent.ITEM_CLICK , myEventHandler ); > > > > private function myEventHandler( event:ListEvent ) > > { > > // do something > > } > > > > -TH > > > > Also, I'd suggest that you use an ArrayCollection instead of an array; > > if you want to do any data manipulation. > > > > --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, "lehaianh1986" lehaianh1986@ > > wrote: > > > > > > Hi every body. I have a AdvancedDatagird and dataprovider from Array > > Collection. How to listen an event when I click to each row? I want > use > > an event when I click left mouse, right mouse, double click,...etc > > > > > > My code is here but it not run > > > > > > var client:AdvancedDataGrid = new AdvancedDataGrid; > > > client.dataProvider = ArrayResults; > > > > > > client.addEventListener(ListEvent.ITEM_CLICK,function(event:ListEvent):v\ > \ > > oid > > > { > > > ... > > > }); > > > > > >