I set property isRowSelectable={() => Math.random() > 0.5}
.
This property sets whether you can select this row.
How can I get count of rows which I can select?
I set property isRowSelectable={() => Math.random() > 0.5}
.
This property sets whether you can select this row.
How can I get count of rows which I can select?
You can find out how many selectable rows simply by looping over all RowNode
s and count them:
const onGetSelectableRow = () => {
let selectable = 0;
gridApi.forEachNode((node, i) => {
if (node.selectable) selectable++
});
alert('selectable rows: ' + selectable);
}