Posted 12 July 2021, 7:02 am EST
Hi team,
We want to remove a newly added row from the collectionView , when we click on delete button. But after removing this row, color highlighting is not working for the existing deleted row.
Steps
- add a new row. select that row.
- select existing two rows.
- click on delete.
the new row gets deleted but existing two rows are not getting highlighted with red color, for that we have to explicitly uncheck the row.
How to fix this issue ?
Snippet of above sample : -
https://stackblitz.com/edit/angular-u6wtuv?file=src/app/app.component.ts
deleteUser() {
this.selectedItems = this.getSelectedRows(this.grid);
const view = this.grid.collectionView as wjcCore.CollectionView;
this.selectedItems.forEach(row => {
if (row.isSelected) {
if (row.dataItem.id === 1000) {
view.remove(row.dataItem);
}
row.dataItem._isColor = true;
row.dataItem._cssClass = this.cssClassDelete;
}
row.isSelected = false;
});
this.grid.invalidate();
}
Please help us with the solution.
Thank you.