Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

Hybrid View

  1. #1
    Sencha User Ingol's Avatar
    Join Date
    May 2011
    Location
    Moon
    Posts
    4
    Vote Rating
    3
    Ingol is on a distinguished road

      0  

    Question Using Ext.data.Store filter?

    Using Ext.data.Store filter?


    Hi,

    I am pretty new to ExtJS but Im loving It ,

    How to take value from input field and then filter it through JSON, and then show results in a grid , not before filtering? IS it possible, on the client -side?

  2. #2
    Sencha User Ingol's Avatar
    Join Date
    May 2011
    Location
    Moon
    Posts
    4
    Vote Rating
    3
    Ingol is on a distinguished road

      1  

    Default


    This works, but only once, second time i click button, no result? Also, works only if autoLoad:true, but if this set to false, no result at all, pleeass hellp!


    xtype: 'button',
    text:'Searchi',
    width:80,
    handler:function(){

    store.filter('fieldName', Ext.getCmp("fieldId").getValue());

    }


    Which means that it doesnt search through JSON, but only cuts down what has been already shown... ?????

  3. #3
    Sencha User Ingol's Avatar
    Join Date
    May 2011
    Location
    Moon
    Posts
    4
    Vote Rating
    3
    Ingol is on a distinguished road

      1  

    Default


    Ok, so ,

    Code:
    handler:function(){
    	var me = Ext.getCmp("textFieldNaziv").getValue();
    	myStore.filter('naziv', me);
    }
    only filters data that has already been displayed to grid, but how to filter JSON, or STORE, so when i click second time it starts from top of the DATA(json), considering that autoLoad is false????

    Please guys, just a hint, link....

  4. #4
    Sencha User Ingol's Avatar
    Join Date
    May 2011
    Location
    Moon
    Posts
    4
    Vote Rating
    3
    Ingol is on a distinguished road

      1  

    Wink ANSWER

    ANSWER


    The answer is:
    Code:
    {
        xtype: 'button',
        text:'Search',
        handler:function(){
    
            store.clearFilter();
            var searchValue = Ext.getCmp("textFieldId").getValue();
            store.load().filter('jsonGridFielName', searchValue);
    
        }                   
    
    }

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Posts
    118
    Vote Rating
    9
    Bunchofstring will become famous soon enough

      0  

    Default


    Quote Originally Posted by Ingol View Post
    The answer is:
    Code:
    {
        xtype: 'button',
        text:'Search',
        handler:function(){
            store.clearFilter();
            var searchValue = Ext.getCmp("textFieldId").getValue();
            store.load().filter('jsonGridFielName', searchValue);
        }
    }
    Just beware that store.clearFilter() can take significant time to complete when working with many records. If need be, there is a way to obviate the clearFilter call (but it's not trivial).

Thread Participants: 1

Tags for this Thread