Threaded View

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    48
    Vote Rating
    0
    eaglefox12 is on a distinguished road

      0  

    Default Answered: How to retain previous filter on checkbox extjs 4.1

    Answered: How to retain previous filter on checkbox extjs 4.1


    Hey everyone... I am trying to use this checkbox filter... where a user clicks and then shows list of states on a grid that's only cold... when the user unchecks, I want the store to be back on the previous state... I don't want to use the store.clearfilter() because it just clears my previous filter... I want to retain the previous filter (which is triggered from another combox)... Here's my code that i am trying to use.. but it says
    Code:
    TypeError: a.getRoot.call(a, d) is undefined
    please help... is there another way to implement this? thanks
    Code:
        items: [{
                        xtype: 'checkboxfield',
                        boxLabel: 'Show only Cold State',
                        scope: this,
                        handler: function (field, value) {
                            scope: this,
                            this.checkValue = field.getValue();
                            console.log(this.checkValue);
                            if (this.checkValue == true) {
                                var tempstore1 = Ext.getCmp('GridArea1').store;
                                    tempstore1.filters.add('CheckBoxFilter', new Ext.util.Filter({
                                        property: 'Cold',
                                        value: 'Yes',
                                        root: 'myTable'
                                    }));
                                    console.log('here');
                                    tempstore1.load();
                            }
                            else if (this.checkValue == false) {
                                     this.store.filters.removeAtKey('CheckBoxFilter');
                            }
                        },

  2. Some code that may help you:

    Code:
        clearFilter: function() {
            var store = this.store,
                filter = this.activeFilter,
                filters = store.filters,
                remaining;
                
            if (filter) {
                if (filters.getCount() > 1) {
                    // More than 1 existing filter
                    filters.remove(filter);
                    remaining = filters.getRange();
                }
                store.clearFilter(true);
                if (remaining) {
                    store.filter(remaining);
                }
            }
            return !!filter;
        },

Thread Participants: 1

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