Reputation: 91
Currently I am using ag-grid to implement my table but I faced a problem. I just want to display the checkbox in same rows only instead of all rows. May I know how to do it?
Upvotes: 3
Views: 10359
Reputation: 7338
From the docs on the column properties:
checkboxSelection - Boolean or Function. Set to true (or return true from function) to render a selection checkbox in the column.
Here is a plunker with an example that puts a checkbox for people whose names start with a letter that is greater than 'M'
The relevant code that can be found in the app/rich-grid.component.ts
:
headerName: "Name",
field: "name",
checkboxSelection: params=>params.data.name[0] >'M'
Upvotes: 5