Ag-Grid:如何获得有针对性的细胞价值
发布时间:2020-12-15 16:21:38 所属栏目:百科 来源:网络整理
导读:如何通过使用键盘箭头键在聚焦于单元格的时间获得聚焦单元格值 解决方法 您可以通过使用获得聚焦单元格 var focusedCell = gridOptions.api.getFocusedCell(); 或使用onCellFocused事件. 两者都为您提供以下属性: rowIndex:数字 列:列 使用row-index检索
如何通过使用键盘箭头键在聚焦于单元格的时间获得聚焦单元格值
解决方法
您可以通过使用获得聚焦单元格
var focusedCell = gridOptions.api.getFocusedCell(); 或使用onCellFocused事件. 两者都为您提供以下属性: > rowIndex:数字 使用row-index检索行节点: var row = gridOptions.api.getDisplayedRowAtIndex(rowIndex); 之后,您可以使用这些属性来检索单元格的原始值: var cellValue = gridOptions.api.getValue(colKey,row.node) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |