Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Expand nodes with AutomaticSmartCallbacks
posted

Hi,

is there any way to expand some of the tree nodes in the code, when tree is binded to a datasource and AutomaticSmartCallbacks is turned on ? I am trying to set

e.Node.SetExpand(True) in NodeBound event, but it doesn't change anything.

 

Thanks in advance

Bartek

Parents
No Data
Reply
  • 45049
    Verified Answer
    posted

    When you programmatically expand a node on the server, this does not trigger automatic generation of any child nodes that would be loaded on-demand.  This is the case regardless of which load-on-demand type you're using (automatic or manual, with or without smart callbacks).  This is documented in the Remarks section of the API documentation of the DemandLoad event of WebTree:

    If a node is expanded programmatically by setting the Expanded property to true, then it must be populated programatically at the same time as well. In this case, the LoadOnDemand event will not be fired.

    As suggested in this remark, if the programmer wants to programmatically expand a parent node and have child nodes appear in this setup, the programmer will have to manually add the correct child nodes to the Nodes collection of the expanded parent node.

Children
No Data