How to disable primeNg TreeTable Parent Node

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
mohammad66
Posts: 2
Joined: 02 Dec 2019, 09:47

21 Apr 2020, 13:02

I'm using PrimeNG tree table control. I need when the user select a child node, disable all other parent nodes which do not belong to the current selected child node.

How to do that?

Here is my code:

Code: Select all

<p-treeTable [value]="_files" [columns]="_cols" dataKey="name" [resizableColumns]="true"
             [(contextMenuSelection)]="_selectedNode" [contextMenu]="cm"
             [style]="{width:'800px'}" scrollHeight="200px">
  <ng-template pTemplate="header" let-columns>
    <tr>
      <th *ngFor="let col of columns" ttResizableColumn>
        {{col.header}}
      </th>
    </tr>
  </ng-template>
  <ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">

    <tr [ttContextMenuRow]="rowNode">
      <td *ngFor="let col of columns; let i = index" (dblclick)="dd()" (click)="RowClicked($event,rowNode)">
        <p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0" class="pi user-set"></p-treeTableToggler>
        {{rowData[col.field]}}
      </td>
    </tr>
  </ng-template>
</p-treeTable>

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

02 Aug 2020, 14:10

Hi,

Thanks a lot for the code block! But, this issue is not related to Layout or Theme. Could you please create a new issue on primeng forum;
viewforum.php?f=35

Thanks a lot for your understanding!
Best Regards,

Post Reply

Return to “Mirage - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest