1
votes

In my column defs i have this:

 {
        headerName: 'All',
        field: 'all',
        headerCheckboxSelection: true,
        headerCheckboxSelectionFilteredOnly: true,
        checkboxSelection: true,
        width: 40,
        maxWidth: 40,
        suppressFilter: true,
        cellStyle: params => {

          return { textAlign: 'center' }

        }
      },

But when i select by checkbox i dont get selected rows.Any suggestion how can i do that, to make select by checkbox same as row selection?

Im using this from ag grid documentation: https://www.ag-grid.com/javascript-grid-selection/

1
try gridApi.getSelectedRows() - Durgesh Pal
but how can i trigger that event when user click checkbox ? on every click on checkbox i need to catch that and do something with that - None
try grid callback event - (rowSelected)="rowSelected()". Refer - ag-grid.com/javascript-grid-events - Durgesh Pal
thats it ... tnx :) - None

1 Answers

1
votes

From ag-grid Grid Events API

rowSelected Row is selected or deselected.

Example given:

(rowSelected)="rowSelected()"