1

I want to prevent opening wijmo tree node based on some condition or disabling specific node based on condition. I tried to use 'expandOnClick' property of treeview which prevents the opening of current node but it is possible to open node on clicking glyph icon. I am using wijmo 5.2019 with angular 8.

<wj-tree-view #treeView [itemsSource]="itemsSource" [displayMemberPath]="'Name'" [wjContextMenu]="ctxMenu" [childItemsPath]="'Children'"
(formatItem)="formatItem(treeView, $event)" [allowDragging]="config.canDrag ? true : false" [expandOnClick]="this.openNode">

How can i prevent opening node?

Vinay
  • 2,272
  • 4
  • 19
  • 34

1 Answers1

2

You can handle the isCollapsedChanging event of the TreeView and cancel the event if the condition match. I have created a demo sample for you here.

assax24
  • 171
  • 5
  • 1
    thanks your sample demo is working. but I found a solution by assigning undefined to children array based on some condition. – Vinay Nov 26 '19 at 04:23