views:

1519

answers:

1

Hi,

I want to implement an Excel like keyboard (arrow) navigation in an Advanced Datagrid in Flex. The docu at http://livedocs.adobe.com/flex/3/html/help.html?content=advdatagrid%5F11.html states that arrow keys can be used to navigate around cells. However, in my case that does not work. I can only navigate rows up and down

---snip ---

When focus is on the AdvancedDataGrid control:

* Use the Left, Right, Up, and Down Arrow keys to move between cells.
* Use the Shift+Home and Shift+End keys to move to the first and last column in current row.
* Cells are only selected by default, they are not editable.
* Press the F2 key to make a cell editable.

--- snap ---

Any ideas on that?

Thx, Martin

+2  A: 

By default you can select an entire row in the advancedDataGrid. You need to change the selection mode to single cell. Then all the arrows will work

 <mx:AdvancedDataGrid id="myADG"
       width="100%"
       height="100%"
       color="0x323232"
       selectionMode="singleCell"
       initialize="gc.refresh();">
Phil C
Hi Phil,thanks! That works great - did not know that I could set this property.Now I can navigate around with the cursors - do you a suggstion how I could implemente that by starting typing/pressing the enter key I can start editing the cell? Some keydownhandler?Thanks
Martin