EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aswzen on June 26, 2014, 06:14:49 PM



Title: Link on Tree
Post by: aswzen on June 26, 2014, 06:14:49 PM
Help me please,

How to create a link on an easyui tree based on JSON that populate the tree?

why there s no demo for important feature like this?....


thanks in advance


Title: Re: Link on Tree
Post by: stworthy on June 26, 2014, 06:32:55 PM
Please use the 'formatter' function to convert the node to a link.
Code:
$('#tt').tree({
formatter:function(node){
return '<a href="..." target="_blank">'+node.text+'</a>';
}
})


Title: Re: Link on Tree
Post by: aswzen on July 16, 2014, 08:02:26 PM
I just populated tree using json..and the tree just have 40 item..
Should i format all of them (with conditional) ???