Dynamic loading to dhtmlxtree

Is there an example for dynamic loading of a dhtmlx tree with json?

But now from json file, but from json data which I will get from C# method.

Here’s what I did to build a tree from Json:

tree.enableSmartXMLParsing(true);
tree.loadJSON('/MyControllerName/MyMethod');

and it worked, the tree looked good. But it didn’t have dynamic loading.

I saw this example:
dhtmlx.com/docs/products/dht … _json.html

but it’s from file. I tried:

tree.setXMLAutoLoading("/MyControllerName/MyMethod");

and MyMethod doesn’t even get called.

hello,

here is the sample in tree package (pro edition):

dhtmlxTree/samples/11_json_support/01_pro_dyn_loading_json.html

The same sample in online docs:
dhtmlx.com/docs/products/dht … _json.html

Hope it’ll helpp to solve the problem.

But that example is from json file. As I said before it doesn’t help me. I need an example which builds the tree from json data, not json file.

Plus, the example is the same I posted in my second post.

Please find dhtmlxTree/samples/11_json_support/01_pro_dyn_loading_json.html example in the Tree package. Also you can find an example of php script that creates json output:

dhtmlxTree/samples/11_json_support/php/json.php

Plus, the example is the same I posted in my second post.

Sorry I missed it.

That example too is with file.

Ok, I will assume that dynamic loading of a dhtmlx tree from json object which isn’t read from a file is impossible.

Please check the following post:

viewtopic.php?f=3&t=20127#p64026