EasyUI Forum
May 16, 2024, 10:55:33 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: The tree how to order by text?  (Read 6329 times)
aboboo
Newbie
*
Posts: 15


View Profile
« on: January 05, 2015, 06:21:00 PM »

just like datagrid have sortName and sortOrder, why tree doesn.t ? if I want order by text in the tree? how should I do ?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: January 05, 2015, 07:15:13 PM »

You can order the nodes in your server side, or re-order the nodes in the 'loadFilter' function.
Code:
$('#tt').tree({
  loadFilter: function(data, parent){
    var ordered = ... // order the data
    return ordered;
  }
});
Logged
aboboo
Newbie
*
Posts: 15


View Profile
« Reply #2 on: January 05, 2015, 08:26:35 PM »

thank you! but it seems can't solve my problem. please look the attachments!
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!