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.
Asked
Active
Viewed 860 times
-1
-
provide the sample code! – Amit Golhar Feb 15 '19 at 13:43
1 Answers
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