0

I have ag-Grid with huge number of rows. I have another property which if set to true then the rows should be selected. I see that we can iterate over the rows and then set the selection to true/false. My collection is large, so I don't want to iterate over each row to set this. Is it possible to bind this selection to my property?

KPS81
  • 21

1 Answers1

0

If you are looking for a property to bind the selection as properties like columnDefs, rows, etc,...

<ag-grid-angular
  class="ag-theme-balham"
  [columnDefs]="columnDefs"
  ....
  [rowSelection]="rowSelection"
  (selectionChanged)="onSelectionChanged($event)"
  (gridReady)="onGridReady($event)"
></ag-grid-angular>`

Then the answer is NO.

You'll have to iterate the records to select them.

Another reference: Programmatically select a row ag-grid + angular 2

Paritosh
  • 11,144
  • 5
  • 56
  • 74