PDA

View Full Version : Enter key not captured when pressed in last row of AdvancedDataGrid


bon_t
06-16-2011, 03:44 PM
Hi All,

I'm using an AdvancedDataGrid component in Flex 4, ActionScript 3.

I set the keyUp attribute of the grid to the following inlined method:

protected function adgGrid_keyHandler( event:KeyboardEvent ):void {
// If user presses Enter (13) or Tab (9).
if ( event.charCode == 13 || event.charCode == 9 ) {
accessRowHandler();
}
}

I put a breakpoint inside this method. When I'm in Edit mode in any cell on the last row of the grid, and I press Enter, the keyUp event is not captured (ie. the code does not stop at the breakpoint). This also happens when I'm in Edit mode in the last cell in the last row, and I press Tab.

Is this a known bug? What's a logical/adequate workaround for it?
Thanks!
Bonnie

Kevin Richards
08-30-2011, 05:46 AM
I'm not sure I know the solution to this but I'm sure one of the many bright minds around this forum will be able to help you :)

dhape
09-25-2011, 09:35 PM
Create a custom component that extends the TextInput.
Add a new variable to UndoTextInput
Add an event listener on the focusIn event.
Add an event on the focusOut event.
Add an event listener on the keyDown event.