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
Hello Bartek,
Please let me know if you have any other questions on this issue.
Thanks,
Valerie
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.
Lubomir