I am using ManualSmartCallbacks and would like to set the DataPath client-side in the DemandLoad event, but there doesn't seem to be an Method to do this.
I need to do this because DataPath is the only field that seems to stay around when populating a tree view the DemandLoad server-side event. I'm setting data to the tag, but when that node is expanded the tag is not passed to the server. In reading other posts, I noted that DataPath is the only field that is persisted throughout, so in my server-side code I set the DataPath property also. I would like to be able to add additional client-side info and pass it up, but since I can't set DataPath, I seem to be restricted.
I am using 2007-3, so maybe there's an appropriate method in 2008-3.
Suggestions?
Thanks!
HelloYou can use the property Tag of node and set value. Please take a look code below:
ASPX code: <ignav:UltraWebTree ID="UltraWebTree1" LoadOnDemand="ManualSmartCallbacks" runat="server" OnDemandLoad="UltraWebTree1_DemandLoad"> <ClientSideEvents DemandLoad="Load" /> <Nodes> <ignav:Node Text="R" ShowExpand="true"> </ignav:Node> </Nodes> </ignav:UltraWebTree>
JS code: <script type="text/javascript"> function Load(menuId, itemId) { var node = igtree_getNodeById(itemId); node.setTag("tag");
} </script>C# code: protected void UltraWebTree1_DemandLoad(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e) { Label1.Text = e.Node.Tag.ToString(); }
Hope this helps.