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
395
LoadOnDemand not working properly
posted

Hi Guys,

I am having problems with LoadOnDemand property in WebDataTree. I have following tree definition:

 

 

<ig:WebDataTree ID="uwt_Explorer" runat="server" StyleSetName="Default" EnableConnectorLines="true" SelectionType="Single"

 

 

 

Width="100%"

 

 

Height="100%"

 

 

EnableAjax="true"

 

 

OnNodeBound="uwt_Explorer_NodeBound"

 InitialDataBindDepth="2" InitialExpandDepth="2" >

 <ClientEvents />

 <DragDropSettings AllowDrop="true" DragDropMode="Default" EnableDragDrop="True" />

 

 

<DataBindings>

 

 

<ig:DataTreeNodeBinding DataMember="Node" ValueField="Tag" TextField="Text" ImageUrlField="ImageUrl" />

 

 

</DataBindings>

 

 

 </ig:WebDataTree>

 

 

I am using xml data source and bind it on page load 

uwt_Explorer.DataSource = xds_DataSource

 

uwt_Explorer.DataBind()

When page loads, uwt_Explorer_NodeBound method is called properly for every inital expanded node. However when I try to expand a node that wasn't initially loaded I am getting ajax indicator, but uwt_Explorer_NodeBound is not fired at all and nothing happens. I don't get any error on page or from the javascript.

Thanks

Bartek

 

Parents
  • 3726
    Suggested Answer
    posted

    Hi,

    NodeBound is fired only after a call to DataBind(). Which signals that the nodes are added to the tree. When you try to expand a node on the client if the node is not populated then an AJAX request is posted on the server and you have to receive the children data. Since on AJAX requests the page has full pafe lifecycle and it is a postback, if you do not call DataBind() on the postback,  NodeBound will not be fired.

    Thanks,

    Lubomir

Reply Children
No Data