canExpand
Topic group Related topics Example
Event fired when attempting to expand or collapse a tree item; return value determines whether expand/collapse occurs.
Parameters
<oItem>
The TreeItem whose + or - has been clicked.
Property of
TreeView
Description
Use canExpand to conditionally allow the expansion or collapsing of a tree item’s subtree. The canExpand event handler can either return true to allow the action, or false to prevent it.
The canExpand event only affects the user interface. You can still expand or collapse a tree item programmatically by setting the item’s expanded property, in which case canExpand does not fire.