< class="prominent-subhead ">

Tree control: The "Tree is Changed" event executes multiple times

This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.


If you configured a message to show when a node in a tree control is clicked, you may see the rule execute multiple times:



Your rule may be configured as follows within your Tree control when the issue occurs.


The issue will occur when you click on the Parent or Child nodes.


The developers have confirmed that this is an issue with the product, and they have provided a workaround for the issue.

On the Tree Control property, set the Load Ahead Level property to 2:


Configure an advanced condition on the Tree is Changed Event, that checks whether the selected value is empty or not, only showing the message box, if it’s not empty:


The result of this is that only one message box is displayed when selecting items.