dhtmlxTree: adding a URL to an item in the tree

In looking at the samples for dhtmlxTree, I don’t see anything in the XML model that allows the specification of a URL for each item in the tree. We’re thinking of using dhtmlxTree for the navigation for our web site. Is there a simple way to associate a launch URL with each tree item? I didn’t expect that any custom coding would be needed, but now I’m not so sure.

If you want the tree items to be a tags - just use inline HTML

<![CDATA[ any test]]>

( The itemtext supported in PRO edition only )

Or you can use userdata sections


and on client side
    return true;


I have a question on same line…

In the following xml code for grid - how do I disable the onclick functionality for some folders ?

currently If I click on the folder “reporting” - I see error page “page cannot be found” on right side frame


…html snippet

 function doOnClick(id){
 var Url = tree.getUserData(id,“href”);
 parent.right.location.href = myUrl;


Please advise.



There is no way to disable event for some items, it will occur for each, but you can check value of attribute|userdata before executing any action.

function doOnClick(id){
var myUrl = tree.getUserData(id,“href”);
if (myUrl) // can be added
parent.right.location.href = myUrl;