1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
    new is on a distinguished road

      0  

    Default Answered: Search inside extjs tree store

    Answered: Search inside extjs tree store


    I have a text field in my tree toolbar that should take a string from a user then search that through a specific column of tree. I use store filter but there is a problem in my code and I dont know what it is. thanks for help. This is my code:

    PHP Code:
    var onSimpleSearch = function(){
     var 
    searchStrExt.getCmp('searchField').getValue();
       if(
    searchStr){
        var 
    tree Ext.getCmp('infra_tree');
        var 
    tstore tree.getStore();
        var 
    searchReg = new RegExp(searchStr'g');
        
    console.log(searchReg);
        
    tstore.filter({property:"ipadd"value:searchStr});
    }else {
        
    Ext.MessageBox.show({
            
    title'Nothing to search',
            
    msg'Search string is empty',
            
    icon 'ext-mb-info',
            
    buttonsExt.MessageBox.OK
        
    });
      }
    }; 
    Erropr: RegEx is not Defined

  2. TreeStore has no 'filter' method, you'll need to use cascadeBy(fn) on the root node for now.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,588
    Answers
    540
    Vote Rating
    322
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Get a stacktrace using Firebug or the Chrome Developer Tools. Should tell you what line the error happens on.

  4. #3
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,735
    Answers
    33
    Vote Rating
    104
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    TreeStore has no 'filter' method, you'll need to use cascadeBy(fn) on the root node for now.

  5. #4
    Sencha User
    Join Date
    Jan 2010
    Posts
    30
    Vote Rating
    0
    new is on a distinguished road

      0  

    Default


    OK, thanks for reply.
    We will appreciate if extjs development team implement this feature in future

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi