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

  • SEARCH
  • Home
  • 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 7831343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:40:54+00:00 2026-06-02T11:40:54+00:00

I am a beginner in Ext library, I am trying to extend a grid

  • 0

I am a beginner in Ext library, I am trying to extend a grid panel and referencing its store from one of my new class records:

Ext.define('App.ui.CategoryGridPanel', {
extend : 'Ext.grid.Panel',
initComponent : function() {
    var storeToUse = this.store;

    if (storeToUse == null) {
        storeToUse = Ext.data.StoreManager.lookup(StoreIDs.CategoryStore);
    }

    this.categoryRowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
        clicksToEdit : 2,
        store : storeToUse,
        listeners : {
            edit : function(editor, e) {
                this.store.sync();
            }
        }
    });

    Ext.apply(this, {
        store : storeToUse,
        height : 400,
        width : 300,
        plugins : [ this.categoryRowEditing ],
        columns : [ {
            header : 'Description',
            dataIndex : 'description',
            flex : 1,
            sortable : true,
            editor : 'textfield'
        } ],
        tbar : [ {
            xtype : 'button',
            text : 'New',
            handler : this.insertNewCategory
        } ]
    });

    this.callParent(arguments);
},
/**
 * Add new Category to grid.
 */
insertNewCategory : function() {
    var category = Ext.create(ModelNames.Category, {
        description : ''
    });

    this.store.insert(0, category);
    this.categoryRowEditing.startEdit(0, 0);
}

});

the method inserNewCategory always throw can not call insert of undefined
after putting some alerts I found that this.store returns null.
I checked Ext sample codes, but I do not do anything different.

Please help 🙁

  • 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-02T11:41:00+00:00Added an answer on June 2, 2026 at 11:41 am
    1. Check what you see as this in your insertNewCategory method. You will be surprised. My bet – it will be button you’re pressing, because you didn’t do anything about scope of this function.

    2. Read Sencha guides and walk-through. From your code sample it’s clear you are using it in a completely wrong way – you don’t need to do all this manual work to assign and re-assign store – this is all handled by ExtJs automatically.

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

Sidebar

Related Questions

PHP beginner working from a tutorial. I'm trying to do a simple upload from
Beginner rails question: How does one return a file from a controller in rails?
Python beginner here. I am using the matplotlib library to make graphs from tab
Beginner question perhaps: I'm trying to check my user permissions from facebook with Koala.
A beginner's question, probably a trivial one. Here's the XUL code snippet: <window xmlns=http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul>
i am a beginner in sencha touch , i am trying to run a
Beginner at Django here, I've been trying to fix this for a long time
A beginner question, bear with me: I'm just wondering under what circumstances one should
Beginner question... How different is define($a,365); from $a = 365; ? Thanks! JDelage
A beginner's question: I am trying to remove a subview after having added it

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.