Apache flex FlexDataGrid中的键盘导航
我想在Flex的高级Datagrid中实现类似Excel的键盘箭头导航。 文件在 表示可以使用箭头键在单元格周围导航。然而,在我的情况下,这是行不通的。我只能上下浏览行 --剪断-- 当焦点在AdvancedDataGrid控件上时:Apache flex FlexDataGrid中的键盘导航,apache-flex,actionscript-3,Apache Flex,Actionscript 3,我想在Flex的高级Datagrid中实现类似Excel的键盘箭头导航。 文件在 表示可以使用箭头键在单元格周围导航。然而,在我的情况下,这是行不通的。我只能上下浏览行 --剪断-- 当焦点在AdvancedDataGrid控件上时: * 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 a
* 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.
--折断--
有什么想法吗
Thx,
Martin默认情况下,您可以在advancedDataGrid中选择整行。您需要将选择模式更改为“单个单元格”。那么所有的箭头都会起作用
<mx:AdvancedDataGrid id="myADG"
width="100%"
height="100%"
color="0x323232"
selectionMode="singleCell"
initialize="gc.refresh();">
您是否建议我如何通过开始键入/按enter键来实现这一点,从而开始编辑单元格?一些按键处理程序 大多数Flex可视组件继承自UIComponent。UIComponent定义了一个keyDownHandler,首先调用它来处理键盘操作。您可以在ADG的扩展中覆盖此选项,并检查键盘输入是否为字母数字。如果是这样,可以通过设置editemposition来启动编辑会话。希望这有帮助!
嗨,菲尔,谢谢!这非常有效-我不知道我可以设置此属性。现在我可以用光标导航了-你有没有建议我如何通过开始键入/按enter键来实现这一点,我可以开始编辑单元格?一些按键处理程序?谢谢