首页 > 解决方案 > 在ag-grid中单击tab键时如何获取下一个/上一个单元格定义

问题描述

我正在使用ag-grid,我需要在ag-grid. 请找到plnkr 网址。单击 Tab 键时,请提供您的输入以获取下一个/上一个单元格定义。

标签: javascriptangularjsag-grid

解决方案


参考文档:示例自定义导航

有一个事件和属性。

[tabToNextCell]="tabToNextCell"
[navigateToNextCell]="navigateToNextCell"

另请参阅tabToNextCell

interface TabToNextCellParams {

  // true if the shift key is also down
  backwards: boolean;

  // true if the current cell is editing (you may want to skip cells that are not editable,
  // as the grid will enter the next cell in editing mode also if tabbing)
  editing: boolean;

  // the cell that currently has focus
  previousCellDef: GridCellDef;

  // the cell the grid would normally pick as the next cell for this navigation
  nextCellDef: GridCellDef;
}

推荐阅读