Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ag-grid hide checkbox in some rows depend on the cell value

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?

like image 761
Jim Avatar asked Nov 24 '25 22:11

Jim


1 Answers

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'
like image 93
Jarod Moser Avatar answered Nov 27 '25 12:11

Jarod Moser



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!