1. #1
    Sencha User
    Join Date
    Sep 2008
    Posts
    71
    Vote Rating
    2
    Answers
    1
    klodoma1 will become famous soon enough

      0  

    Default Answered: Point the grid loadmask over one toolbar item, not over the grid

    Answered: Point the grid loadmask over one toolbar item, not over the grid


    Hi,

    I want to point the loadmask of the gridpanel over an element in the toolbar, but haven't figured out how to do it.

    This code is showing the loadmask where I need:
    PHP Code:
    new Ext.LoadMask(grid.down('tbfill'), {}).show(); 

    but I was not able to bind it to the grid view's loadmask:
    PHP Code:
    grid.getView().setLoading(new Ext.LoadMask(grid.down('tbfill'), {})); 
    I've tried several options with setLoading, even replacing the view's loadMask directly, but it's not working as I would like to.

    Any ideas?
    Management means doing the things right,
    Leadership means doing the right things.

    www.interpid.eu, www.webdbadmin.com

  2. For me it was not clear how the store is binded to the loadmask...

    So here is the solution that works:

    PHP Code:
            me.on('afterrender', function() {
                var 
    mask = new Ext.LoadMask(me.down('tbfill'), {});
                
    mask.bindStore(me.getStore());
            }); 
    me - is the grid object
    tbfill - is a spacer in the grid tab.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,121
    Vote Rating
    453
    Answers
    3160
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Instead of using setLoading on the grid, use it on the component you want masked.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Sep 2008
    Posts
    71
    Vote Rating
    2
    Answers
    1
    klodoma1 will become famous soon enough

      0  

    Default


    For me it was not clear how the store is binded to the loadmask...

    So here is the solution that works:

    PHP Code:
            me.on('afterrender', function() {
                var 
    mask = new Ext.LoadMask(me.down('tbfill'), {});
                
    mask.bindStore(me.getStore());
            }); 
    me - is the grid object
    tbfill - is a spacer in the grid tab.
    Management means doing the things right,
    Leadership means doing the right things.

    www.interpid.eu, www.webdbadmin.com