Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: How to sort tree at client side?

  1. #11
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    Something like:
    Code:
    var sortByName = function(node1, node2){
        var v1 = node1.text, v2 = node2.text;
        if (v1 < v2) {
            return -1;
        } else if (v1 > v2) {
            return 1;
        }
        return 0;
    };
    var sortByCount = function(node1, node2){
        var v1 = node1.attributes.count, v2 = node2.attributes.count;
        return v1 - v2;
    };

  2. #12
    Sencha User
    Join Date
    Oct 2008
    Posts
    278
    Vote Rating
    0
      0  

    Default

    thanks condor...

    I will try and let u know...u r really gr8

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 4
    Last Post: 5 Jun 2009, 9:43 AM
  2. Server Side And Client Side Communication
    By YargicX in forum Community Discussion
    Replies: 3
    Last Post: 15 Apr 2008, 10:52 AM
  3. Reset Client Side Sort
    By sfwalter in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 31 Oct 2007, 2:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •