Search code examples
extjsextjs4

ExtJS 4 Temporarily disable loading mask appearance for a grid


I have a grid and I want to disable appearance of loading mask on it (to prevent double loading mask because I add loading mask to its parent component) at the the execution of certain scripts.

I've tried something like this

var myGridView = myGrid.getView();

myGridView.loadMask = false;

// I want so at this data loding did not appear loading mask
myGrid.getStore().load();

myGridView.loadMask = true;

but it doesnt work.

Any suggestions?


Solution

  • You can use setDisabled() method for LoadMask instance:

    var myGridView = myGrid.getView();
    myGridView.loadMask.setDisabled(true);
    myGrid.getStore().load(function () {
       myGridView.loadMask.setDisabled(false);
    });
    

    As well you can use enable(), disable() methods.