0
votes

I am using devextreme data grid. I have the next code:

<dx-data-grid #grid [routerLink]="grid.selectedRowKeys.length > 0 ? [grid.instance.getSelectedRowsData()[0].Id] : null" routerLinkActive="highlighted">

Whenever I click on a row, it works as expected, but when keyboard navigation (up & down), selectedRowKeys[] is updated, but routerLink does not trigger.

I also have problems with routerLinkActive. It does not "highlight" active link.

Refs: DxDataGrid: https://js.devexpress.com/Documentation/ApiReference/UI_Widgets/dxDataGrid/Methods/?version=14_1#getSelectedRowsData

Router: https://angular.io/guide/router

** If I use routerLink from TS with onSelectionChanged event, it does work well, but I don't know how to make use of routerLinkActive from TS

1

1 Answers

1
votes

You can try binding it to a property in ts, and update that property in onSelectionChanged event.