Grid Ag网格:如何获得聚焦单元值

Grid Ag网格:如何获得聚焦单元值,grid,ag-grid,ag-grid-react,Grid,Ag Grid,Ag Grid React,如何使用键盘箭头键在聚焦单元格时获取聚焦单元格值 var focusedCell = gridOptions.api.getFocusedCell(); 或者使用onCellFocused事件 两者都提供以下属性: 行索引:编号 列:列 使用行索引检索行节点: var row = gridOptions.api.getDisplayedRowAtIndex(rowIndex); 之后,您可以使用这些属性检索单元格的原始值: var cellValue = gridOptions.api.

如何使用键盘箭头键在聚焦单元格时获取聚焦单元格值

var focusedCell = gridOptions.api.getFocusedCell();
或者使用onCellFocused事件

两者都提供以下属性:

  • 行索引:编号
  • 列:列
使用行索引检索行节点:

var row = gridOptions.api.getDisplayedRowAtIndex(rowIndex);
之后,您可以使用这些属性检索单元格的原始值:

var cellValue = gridOptions.api.getValue(colKey, row.node)

@Mallikarjuna-我知道你解决这个问题已经快一个月了,但是你有没有一个关于如何通过键盘导航实现这个的例子?谢谢