EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: nyr_jack on August 06, 2013, 08:32:52 PM



Title: How to make nodes of tree disabled
Post by: nyr_jack 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 !!!! ::)


Title: Re: How to make nodes of tree disabled
Post by: nyr_jack on August 07, 2013, 08:43:29 PM
Now I just want to know how to make the checkbox disabled, please help !!!!


Title: Re: How to make nodes of tree disabled
Post by: stworthy 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;
    }
  }
});


Title: Re: How to make nodes of tree disabled
Post by: nyr_jack on August 08, 2013, 11:11:26 PM
No bad, Thank you !