-1

I want to disable selection of some rows in multi-selection of igx-grid ignite UI for angular so that if I make those rows selected by default then the user should not be able to deselect those rows. I will appreciate any help to achieve the goal.

Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100

1 Answers1

1

Use the onRowSelectionChange event emitter and inside your handler, check if the newSelection includes rows (by record id) that shouldn't be selected, if yes, remove them. If the newSelection excludes rows that should be selected, then include them.

<igx-grid #grid (onRowSelectionChange)="adjustSelection($event)"
          [data]="localData"
          [autoGenerate]="true">
    ......
</igx-grid>
Konstantin Dinev
  • 34,219
  • 14
  • 75
  • 100