1
votes

I am using ngx-datatable and I want to select rows on dblclick (used this). But problem is, that rows are of course not "lightened up".

Basically for activating row highlighting on click you need to add [selectionType]="'single'" input to <ngx-datatable></ngx-datatable>. Is there any way how to trigger this effect?

1
Will you please share code / create plnkr for this?Vivek Doshi
As it is large table integrated to project, it would be hard to make "light" example. I just need to know, if there is way how to for example use ngClass=" 'class' : id === currentRowId "tprieboj

1 Answers

0
votes
(select)="onSelect($event)"
[selected]="activeRecords"

use above two lines of code in html template and write onSelect() in your typescript code as shown below

activeRecords  = [];
onSelect() {
    this.activeRecords = [];
    this.activeRecords.push(event.selected[0]);
}