如何获取AgGrid的选中行列索引(Angular)

How To Get Selected Row Column Index Of AgGrid (Angular)

目前我可以使用 gridApi 获取行数据,但无法获取有关所选行的列索引是什么的信息?

函数 this.gridApi.getSelectedRows() 没有此属性。

请帮忙。

如果您要查找显示的列索引,请尝试使用 columnApi:

var focusedCell = this.gridApi.getFocusedCell();    
this.columnApi.getAllDisplayedColumns().indexOf(focusedCell.column)