作者:捕鱼达人2702938971 | 来源:互联网 | 2022-12-10 13:36
如何通过使用键盘箭头键在聚焦于单元格的时间获得聚焦单元格值
1> Alexander Zb..:
您可以通过使用获得聚焦单元格
var focusedCell = gridOptions.api.getFocusedCell();
或使用onCellFocused事件.
两者都为您提供以下属性:
rowIndex:数字
列:列
使用row-index检索行节点:
var row = gridOptions.api.getDisplayedRowAtIndex(rowIndex);
之后,您可以使用这些属性来检索单元格的原始值:
var cellValue = gridOptions.api.getValue(colKey, row.node)