Angular 通过复选框选择获取选定行?
在我的defs专栏中,我有以下内容:Angular 通过复选框选择获取选定行?,angular,ag-grid,Angular,Ag Grid,在我的defs专栏中,我有以下内容: { headerName: 'All', field: 'all', headerCheckboxSelection: true, headerCheckboxSelectionFilteredOnly: true, checkboxSelection: true, width: 40, maxWidth: 40, suppres
{
headerName: 'All',
field: 'all',
headerCheckboxSelection: true,
headerCheckboxSelectionFilteredOnly: true,
checkboxSelection: true,
width: 40,
maxWidth: 40,
suppressFilter: true,
cellStyle: params => {
return { textAlign: 'center' }
}
},
但是当我选择“按复选框”时,我不会得到选中的行。有什么建议吗?我该如何做,使“按复选框”与“行选择”相同
Im使用ag网格文档中的以下内容:
来自ag电网
行选定行处于选中或取消选中状态
举例如下:
(rowSelected)="rowSelected()"
尝试gridApi.getSelectedRows(),但当用户单击复选框时,如何触发该事件?在每次单击复选框时,我都需要捕获该复选框,并对该复选框执行一些操作,尝试网格回调事件-(rowSelected)=“rowSelected()”。参考-就是这样。。。tnx:)