EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: aboboo on January 05, 2015, 06:21:00 PM



Title: The tree how to order by text?
Post by: aboboo 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 ?


Title: Re: The tree how to order by text?
Post by: jarry 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;
  }
});


Title: Re: The tree how to order by text?
Post by: aboboo on January 05, 2015, 08:26:35 PM
thank you! but it seems can't solve my problem. please look the attachments!