reenakoshta
reenakoshta
WWindmill
Created by reenakoshta on 8/17/2023 in #help
enable checkbox based on column value in ag-grid
Hello, I am trying to add ag-grid table with checkbox column. Is it possible to mark checkbox as checked on bases of row value? I have tried to find the way to do this in ag-grid documentation. where I found this https://www.ag-grid.com/javascript-data-grid/row-selection/#example-displaying-disabled-checkboxes . but not sure where I can add onFirstDataRendered: (params) => { const nodesToSelect = []; params.api.forEachNode((node) => { if (node.data && node.data.year === 2012) { nodesToSelect.push(node); } }); params.api.setNodesSelected({ nodes: nodesToSelect, newValue: true }); } Can someone help me on this?
3 replies