Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: loadMask for GridPanel

  1. #1
    Sencha User nak1's Avatar
    Join Date
    Jan 2008
    Posts
    319

    Default loadMask for GridPanel

    I'm having issue when the Ext.grid.GridPanel is not loading the initial time the store loads. After the Ext.grid.GridPanel is loaded then I reload the grid's store, then the load mask works properly.
    No longer a Newbie

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    792

    Default

    which version are you using, because I am using 3.1.2 and I have the same behavior

    regards
    Frank

  3. #3
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    Did you invoke the load prior to creating your grid?
    Aaron Conran
    @aconran

  4. #4
    Sencha User nak1's Avatar
    Join Date
    Jan 2008
    Posts
    319

    Default

    Quote Originally Posted by franklt69 View Post
    which version are you using, because I am using 3.1.2 and I have the same behavior

    regards
    Frank
    Currently we're using 3.0. Have you attempted to resolve the issue by manipulating the code base?
    No longer a Newbie

  5. #5
    Sencha User nak1's Avatar
    Join Date
    Jan 2008
    Posts
    319

    Default

    Quote Originally Posted by aconran View Post
    Did you invoke the load prior to creating your grid?
    No, I simply used the loadMask attribute set to 'true' for the initialization of the Ext.grid.GridPanel. Do I need to initiate the Ext.LoadMask object? In the documentation for this attribute (in the Ext.grid.GridPanel for the loadMask) is simply states "An Ext.LoadMask config or true to mask the grid while loading. Defaults to false."
    No longer a Newbie

  6. #6
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    If you invoked the load prior to creating the grid this could cause an issue. As the grid would never get the beforeload event that it needs in order to show the LoadMask.
    Aaron Conran
    @aconran

  7. #7
    Sencha User nak1's Avatar
    Join Date
    Jan 2008
    Posts
    319

    Default

    Quote Originally Posted by aconran View Post
    If you invoked the load prior to creating the grid this could cause an issue. As the grid would never get the beforeload event that it needs in order to show the LoadMask.
    That solved the issue, what I had done was call the grid's store to load in the onRender method. I just placed that in an "on" event to execute 'afterrender'
    No longer a Newbie

  8. #8
    Sencha User
    Join Date
    Mar 2007
    Posts
    792

    Default

    nak1 could you give more detail with the code please because I don't understand


    regards
    Frank

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Posts
    792

    Default

    I had it:

    Code:
    Ext.ux.BCFileList = Ext.extend(Ext.grid.GridPanel, {
        title: 'Batch Files Review',
        pageSize: 50,
     loadMask: true,
        viewConfig: {
            autoFill: true
        },
        stripeRows: true,
    ..
    
     afterRender: function() {
            this.getStore().load({
                params: {
                    start: 0,
                    limit: this.pageSize
                }
            });
    
            Ext.ux.BCFileList.superclass.afterRender.apply(this, arguments);
        },
    and the mask the first time do't appear

    regards
    Frank

  10. #10
    Sencha User nak1's Avatar
    Join Date
    Jan 2008
    Posts
    319

    Default

    Quote Originally Posted by franklt69 View Post
    nak1 could you give more detail with the code please because I don't understand


    regards
    Frank
    Sure, if you look at the code below, I have it written correctly. This is calling the grid's store load function after the grid is finished rendering. Before I was just calling it outside of the listener within the onRender function. Now it is in a listener, so that the grid object has time to fully render.

    Code:
    onRender:function(ct, position) {
    		
    			this.on('afterrender',function(){
    				this.getStore().load();
    			})
    			grid_base.superclass.onRender.call(this, ct, position);
    	},
    No longer a Newbie

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •