1

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?

NearHuscarl
  • 66,950
  • 18
  • 261
  • 230
Nazar
  • 23
  • 4

1 Answers1

1

You can find out how many selectable rows simply by looping over all RowNodes and count them:

const onGetSelectableRow = () => {
  let selectable = 0;

  gridApi.forEachNode((node, i) => {
    if (node.selectable) selectable++
  });

  alert('selectable rows: ' + selectable);
}

Live Demo

NearHuscarl
  • 66,950
  • 18
  • 261
  • 230