-
11 Jan 2009 9:58 AM #1
TreePanel + Xml Web Services On Demand (Example)
TreePanel + Xml Web Services On Demand (Example)
Look, this is something I've been trying to figure out for some time and I just found a way to make extjs treepanel to load nodes on-demand directly from an asp.net xml web service (that's xml, not json, json + web services ehh kinda iffy). I just thought I'd share it with anyone else who wants this to work. You need XmlTreeLoader.js from the examples.
Web service:
Script:Code:[WebMethod] [ScriptMethod] public XmlNode GetNodes(int node) { //get nodes from db etc XmlDocument doc = new XmlDocument(); doc.LoadXml("<nodes><node id=\"2\" text=\"the node\" expanded=\"false\"/><node id=\"3\" text=\"another node\" expanded=\"false\"/></nodes>"); return doc.ChildNodes[0]; }
Sorry if this isn't something new..Code://.... treeView = new Ext.tree.TreePanel({ loader: new Ext.ux.XmlTreeLoader({dataUrl:'Service.asmx/GetNodes'}) }); // other attrs...Last edited by swemaniac; 11 Jan 2009 at 10:14 AM. Reason: moved to Examples from 2.x Help
-
10 Mar 2009 1:00 PM #2
More Question
More Question
Nice example, but is no working to me.
Can you send a extended example, because the treeview is not loading data.
Thank's a lot for your help!
-
16 Mar 2009 8:05 AM #3
It works!
It works!
Thank's anyway ..this is working now .. I had to work a litle, but is working
.
Nice example, but you must explain more thing to cover novices like me.
byte!
-
13 May 2009 1:08 AM #4
web service treepanle
web service treepanle
it's possibile to have an examples?
my email is: maxdiable@hotmail.com
help me


Reply With Quote