2
votes

How do I unmask a grid after it has loaded. I am under the EXT JS 4 MVC Architecture.

Here are some code snippets that hopefully help.

My View:

Ext.define('proto.view.Bond.List', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.bondlist',
    requires: [
        'Ext.grid.header.Container', // this fix a Ext JS dependency bug
        'Ext.view.TableChunker',
        'Ext.data.*',
        'Ext.grid.PagingScroller'
    ],

In my Store, which DOES load, I have an event listener, which FIRES.

listeners: {
        load: {
            fn: function (store, records, successful, operation) {

                var memoryStore = Ext.data.StoreManager.lookup('memoryStoreForTheGrid');

                var formMask = Ext.widget('bondlist');
                formMask.el.unmask();

I am getting the following error in Google Chrome.

Uncaught TypeError: Cannot call method 'unmask' of undefined

Any help is appreciated as this used to work. I had named my grid 'grdInventoryResults'

var ThisGrid = Ext.getCmp('grdInventoryResults');
formMask.el.unmask();

I cant seem to use Ext.getCmp anymore, and it also puts an auto number after my form/grids so I cant call them.

1
you need to pass an id to Ext.getCmp(), not the name. - Amol Katdare
So do I need to set an ID for the component? It is generating an auto ID on load. - Patrick
yes, you need to set an id so that you know the id to do a getCmp. In case of auto id, how will you know what you pass to getCmp? auto id is set only if you dont explicitly set an id. - Amol Katdare

1 Answers

0
votes

You should call ThisGrid.el.unmask.

var formMask = Ext.widget('bondlist'); is not valid and will do nothing.