- How do I add a checkbox to ag-grid?
- How do you use a checkbox for a Boolean data with ag-grid?
- How do I change the checkbox icon in ag-grid?
- How do I get selected row data in ag-grid?
How do I add a checkbox to ag-grid?
It is possible to have a checkbox in the header for selection. To configure the column to have a checkbox, set colDef. headerCheckboxSelection=true . headerCheckboxSelection can also be a function, if you want the checkbox to appear sometimes (e.g. if the column is ordered first in the grid).
How do you use a checkbox for a Boolean data with ag-grid?
An input element is created in the ag-Grid init lifecycle method (required) and it's checked attribute is set to the underlying boolean value of the cell it will be rendered in. A click event listener is added to the checkbox which updates this underlying cell value whenever the input is checked/unchecked.
How do I change the checkbox icon in ag-grid?
It's very simple, just go to the node_module --->ag-grid-community --->dist --->styles ---> ag-theme-material.
How do I get selected row data in ag-grid?
To get the currently selected rows you can then use the grid API method getSelectedRows() to return a list of all the currently selected row data.