Posted 15 May 2019, 11:04 pm EST - Updated 3 October 2022, 11:03 am EST
Hi,
I have used Wijmo 5.20171.282 version.
My application used Angular 2.X version.
I want to trigger my method while clicking the hyperlink text (i.e. Send for approval) in custom node content in the tree view.
Right now while clicking the node its highlighted the node item.
Refer my screen shot and code snippet
// in html
<wj-tree-view #tv
[ngClass]=“useCustomCss?‘custom-tree’:‘’”
[itemsSource]=“items”
[displayMemberPath]=“‘header’”
[childItemsPath]=“‘items’”
[isContentHtml]=“true”
[autoCollapse]=“true”
[expandOnClick]=“true”
(itemClicked)=“treeview_ItemClicked(tv)”
(lostFocus)=“treeview_LostFocus()”
(formatItem)=“formatItem(tv, $event)”>
// in component.ts
formatItem(treeView: wjcNav.TreeView, e: wjcNav.FormatNodeEventArgs) {
if (e.dataItem.Draft) {
e.element.innerHTML +=
‘<a style=“font-size:13px; margin-left:5px; text-decoration:underline;” (click)=“openSendForApproval()”>(Send for approval)’;
}
}
openSendForApproval() {
alert(‘clicked send for approval link’);
}
Thanks,
Ramu