EasyUI Forum
December 08, 2025, 12:54:42 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to render tree node  (Read 11883 times)
nyr_jack
Newbie
*
Posts: 31


View Profile
« on: October 16, 2012, 12:17:16 AM »

I want to render nodes of tree with different color. Checked nodes are set to red color and others keep default. The tree need not display checkbox. please help! Huh
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 16, 2012, 03:33:11 AM »

The dynamic text feature is not supported in current version. But calling 'update' method can also change the specify node's color.

Code:
var node = $('#tt').tree('find',...);  // find a node
if (node){
if (node.checked){
node.text = '<span style="color:red">Text</span>';
} else {
node.text = 'Text';
}
$('#tt').tree('update', node);
}
Logged
nyr_jack
Newbie
*
Posts: 31


View Profile
« Reply #2 on: October 18, 2012, 02:32:56 AM »

Thank you!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!