childIndexChanged is in the documentation for DataGrid, as being
inherited from class: mx.core.View.

What is the best way to capture the use of up and down arrow in a
grid, that is what event is fired if the datagrid row changes. If the
user selects a specific row with the mouse, then a cellPress event is
fired. If then teh user uses up or down arrow, how do you catch that
action?

Andrew

--- In [email protected], Matt Chotin <[EMAIL PROTECTED]> wrote:
> I believe the "change" event is going to fire when you update the
selections
> using the keyboard. childIndexChanged is meaningless for DataGrid.
> 
> 
> 
> Matt
> 
> 
> 
> _____ 
> 
> From: greenfishinwater [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 03, 2005 7:50 AM
> To: [email protected]
> Subject: [flexcoders] DataGrid event childIndexChanged not firing
> 
> 
> 
> 
> I have reduced my problem down to the event childIndexChanged not
> firing, or not working as expected. I have example code below which
> illustrates the problem.
> 
> I click on a cell, the event cellPress is fired and displays data in
> the xyz label. What I want also to happen is if I use the up or down
> arrow keys to move to a different row in the grid, then the same logic
> as the cellPress event is required. I implemented this via the
> childIndexChanged event, but it does not fire. I also tried the events
> focusIn and cellFocusIn but they dont work.
> 
> The selectedIndex value has changed, which can be seen in label abc.
> 
> I know in the example below that I can use data binding to get the
> results, but in my own Flex app, I need an AS function do do a lot
> more besides displaying a bit of data.
> 
> Example code:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml
> <http://www.macromedia.com/2003/mxml> ">
> <mx:DataGrid id="musicGrid"
> cellPress="xyz.text=musicGrid.selectedItem.Album" 
> childIndexChanged="xyz.text=musicGrid.selectedItem.Album">
> <mx:dataProvider>
> <mx:Array>
> <mx:Object Artist="Pavement" Price="11.99" Album="Slanted and
> Enchanted" />
> <mx:Object Artist="Pavement" Album="Brighten the Corners"
Price="11.99" />
> <mx:Object Artist="Test" Album="Flex" Price="0.99" />
> </mx:Array>
> </mx:dataProvider>
> <mx:columns>
> <mx:Array>
> <mx:DataGridColumn columnName="Album" />
> <mx:DataGridColumn columnName="Price" />
> </mx:Array>
> </mx:columns>
> </mx:DataGrid>
> <mx:Label text="Album" id="xyz" />
> <mx:Label text="{musicGrid.selectedIndex}" id="abc" />
> </mx:Application>
> 
> Andrew
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Sponsor
> 
> 
> 
> ADVERTISEMENT
> 
>
<http://us.ard.yahoo.com/SIG=1293ck3se/M=298184.6018725.7038619.3001176/D=gr
>
oups/S=1705007207:HM/EXP=1109940641/A=2593423/R=0/SIG=11el9gslf/*http:/www.n
> etflix.com/Default?mqso=60190075> click here
> 
> 
> 
>
<http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S=
> :HM/A=2593423/rand=351847534> 
> 
> 
> 
> _____ 
> 
> Yahoo! Groups Links
> 
> *     To visit your group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
> <http://groups.yahoo.com/group/flexcoders/> 
> 
> *     To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> 
> 
> *     Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/> Terms of Service.





Reply via email to