When you click on tree control parent node name and later on click on "+" button to expand that node changed event executes multiple times depends on the child element present inside that parent node.
See Below example:- When i click on Parent1(text) and then click on "+" button of Parent1, event fires 2 times. If i do same on Parent2, event fires 3 times.
+ Parent1
+Child 1.1
+Child 1.2
+Parent2
+Child 2.1
+Child 2.2
+Child 3.3
How to solve this issues in K2 5.3 version?
Best answer by BB33
Below solution works for me and it is work around for Tree View Control:-
Keep Load Ahead Level property to 1 (As default setting) or set to none.
On Tree Change Event add below Advance Condition to check ID of parent node if it not equal then only execute logic(rules) that you want.
Add Data Label(Flag) on View or Form and set Value as 0.
Add below condition in Changed Event:-
When Tree is Changed
If an Advanced Condition is True (Tree is not empty & Flag is not equal to ID) See image Tree.png
Execute Your Logic Rules.
Set Flag = Tree Current ID (View -->Control-->Tree-->Data Source-->ID) See image Tree1.png
So on changed event it will not loop mutiple time for same ID of your clickable parent node.
Should you find the information from the article useful or leading you to the answer please mark as "Solution and/or Kudo", as it will assist other k2 developers with relevant information in the near future.
Best Regards
Elvis
[K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member]