Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Bryan Hicks on Jan 16, 2009 12:32
open dhtmlx forum
DHtmlxTree and Microsoft script services

I've seen examples on this website of how to dynamically load child nodes in a tree calling php and various other server-side objects. I however, am trying to use script services in ASP.NET. From what I can tell, with script services, the parameters to a script service method are actually stored within the body of the httprequest, rather than as part of the query string, so I'm having a bit of trouble figuring out how to use the setXmlAutoLoading method appropriately. Does setXmlAutoLoading work with script services, or do I need to try a different approach?

Also, I've been looking at the sample applications that demonstrate using dynamic loading to display an infinite tree. However, my tree is not infinite, but I would like to dynamically load it. What property do I have to set on a child item to indicate that it does not have any children beneath it?
Answer posted by Support on Jan 19, 2009 01:34
>> What property do I have to set on a child item to indicate that it does not have
By default tree count item as childless, to mark that it has child items, you need to use special attribute in XML .

<item text="some" id="other" child="1" />

>> Does setXmlAutoLoading work with script services, or do I need to try a different approach?
I'm not pretty sure about how it need to be implemented in your case, but tree allows to define user ways for data loading 

tree.setXMLAutoLoadingBehaviour("function");
tree.setXMLAutoLoading(function(id){
           // id - id of item for which data need to be loaded
           // any kind of code can be executed to load data in tree, by loadXML , loadXMLString or any custom way.
});