Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8886053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:27:51+00:00 2026-06-14T21:27:51+00:00

I have a store that loads a grid that displays state name, capital, and

  • 0

I have a store that loads a grid that displays state name, capital, and Cold Weather.

I also have a checkbox that filters the store depending on the Yes value of ‘Cold Weather’ column.

When I click the checkbox, the grid filters and shows the states that have ‘yes’, but when I uncheck the checkbox, it does nothing.

How can I revert back the store to display previous store? Below is my checkboxfield. Please help.

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) {
                this.store.filter('Cold', 'Yes');
            }
            else if (this.checkValue == false) {
            }
        },

UPDATED CODE – when I do this, I get this error

TypeError: tempstore1 is undefined

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.StoreMgr.lookup('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');
            }
        },

2nd UPDATE – now I get this error

TypeError: a.getRoot.call(a, d) is undefined

instead of

var tempstore1 = Ext.StoreMgr.lookup('store');

I am using

var tempstore1 = Ext.getCmp('GridArea1').store;

GridArea1 is the id of my gridpanel.

3rd UPDATE – Now I get this error with

var tempstore1 = Ext.getCmp('GridArea1').getStore();

error from chrome debugger… “true” and “here” are my console.log and so is the “h” part… that is what the tempstore1 has instead of my data..

true
h {hasListeners: e, scope: h, loading: false, events: Object, eventsSuspended: false…}
here
Uncaught TypeError: Cannot read property ‘Cold’ of undefined

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:27:53+00:00Added an answer on June 14, 2026 at 9:27 pm

    You need to use clearFilter()

    xtype: 'checkboxfield',
    boxLabel: 'Show only Cold State',
    scope: this,
    handler: function (field, value) {
        this.checkValue = field.getValue();
        console.log(this.checkValue);
        if (this.checkValue == true) {
            this.store.filter('Cold', 'Yes');
        }
        else if (this.checkValue == false) {
            this.store.clearFilter();
        }
    }
    

    It is possible to remove a specific filter (clearFilter() removes them all). Instead of using the store.filter('property_to_filter','value') method, use:

    store.filters.add('Coldfilter', new Ext.util.Filter({
        property: 'Cold',
        value: 'Yes',
        root: 'data'
    }));
    store.load();
    

    To remove the filter, use:

    store.filters.removeAtKey('Coldfilter');
    

    There was nothing in the docs about root: 'data' to be added in the filter, now it works: http://jsfiddle.net/vrVRP/2/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a paging grid and some function that load a new store to
So I have a store that loads data for calendar events and a view
I have an XML based file format that I'm using to store and load
I have a list of users in local store that I need to update
I have legacy DB that store dates that means no-date as 9999-21-31, The column
I have a number of models that store words as a string with each
I have an extra NTFS partition to store data that I want to use
I have a class in c# in that store some user messages, and return
I have a tree with n elements that store something like |id|parent_id| . I
I have been working with NSArray s and NSMutableArray s that store NSDate objects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.