EasyUI Forum
May 21, 2024, 11:33:08 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Search Tree  (Read 5941 times)
BinaryCode
Newbie
*
Posts: 38


View Profile
« on: June 09, 2013, 01:56:23 AM »

Hi all,

how to do it on tree :

1. Search Text then checked or select (Problem Solve)
2. Check All Tree Node (parent/Childs)

Regards
B.C
« Last Edit: June 09, 2013, 04:02:49 AM by BinaryCode » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 10, 2013, 06:18:37 AM »

If the 'cascadeCheck' property is set to true, the simple way to check all nodes is to check the root nodes.
Code:
var t = $('#tt');
var roots = t.tree('getRoots');
for(var i=0; i<roots.length; i++){
  t.tree('check', roots[i].target);
}
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!