EasyUI Forum
November 04, 2025, 08:58:16 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 make nodes of tree disabled  (Read 14812 times)
nyr_jack
Newbie
*
Posts: 31


View Profile
« on: August 06, 2013, 08:32:52 PM »

When displaying a tree with remote loaded data,  I want some nodes can't to  be checked or selected, and  make those nodes are disabled whit gray color, so how to do,  please help !!!! Roll Eyes
« Last Edit: August 07, 2013, 05:56:12 PM by nyr_jack » Logged
nyr_jack
Newbie
*
Posts: 31


View Profile
« Reply #1 on: August 07, 2013, 08:43:29 PM »

Now I just want to know how to make the checkbox disabled, please help !!!!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 on: August 08, 2013, 01:08:11 AM »

The 'onBeforeCheck' event can be used to determine if one node can be checked.
Code:
$('#tt').tree({
  onBeforeCheck:function(node){
    if (node.id == 'md'){  // this node can not be checked
      return false;
    }
  }
});
Logged
nyr_jack
Newbie
*
Posts: 31


View Profile
« Reply #3 on: August 08, 2013, 11:11:26 PM »

No bad, 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!