On click of the last element of tree table, I want to route it to another screen (url) and show a table.
For example:
I want to select the last node of the parent node of every element in the tree table.
On click of child node, it should navigate to a new screen.
Looks like this:
>Aamir
>Ranchi
> 12
> 20
> Bangalore
> 22
>Abhinav
> Bangalore
>26
So when user select 12
, 20
,22
or 26
, it should naviagte to a new screen.
Template :
<h3>Dynamic Columns</h3>
<p-treeTable [value]="files2" [columns]="cols" >
<ng-template pTemplate="header" let-columns>
<tr [ttRow]="rowNode">
<th *ngFor="let col of columns">
{{col.header}}
</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
<tr >
<td *ngFor="let col of columns; let i = index">
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
{{rowData[col.field]}}
</td>
</tr>
</ng-template>
</p-treeTable>