[CLOSED] [1.0] Loadmask on Two Grid Sample

  1. #1

    [CLOSED] [1.0] Loadmask on Two Grid Sample

    Hi,

    I have a page similar to the Two Grid example, and im trying to put a loading mask when the Add All button is clicked.

    https://examples1.ext.net/#/GridPane...ous/Two_Grids/

    I couldnt get it to work. Am I missing something? Any help will be greatly appreciated.

    Here's my code
    addAll : function (source, destination) {
                   var loadMask = new Ext.LoadMask(GridPanel2.body, { msg: 'Processing... Please wait..' });
                   loadMask.show();
                    source = source || GridPanel1;
                    destination = destination || GridPanel2;
                    var records = source.store.getRange();
                    source.store.removeAll();
                    Ext.each(records, function(record){
                        destination.store.addSorted(record);                    
                    });                 
                    loadMask.hide();
                },
    Thanks!
    Last edited by Daniil; Feb 09, 2011 at 2:13 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use Ex.net.Mask class.

    To show
    Ext.net.Mask.show({msg: "Processing...", el: GridPanel1.body});
    To hide
    Ext.net.Mask.hide();
  3. #3
    Hi,

    I don't think that mask in this case is possible because javascript one thread enviroment, while browser executes javascript code it cannot update screen
  4. #4
    Hi Daniil,

    I tried the code that you suggested but the mask didnt show.

    addAll: function(source, destination) {
                    Ext.net.Mask.show({ msg: "Processing...", el: GridPanel2.body });
                    source = source || GridPanel1;
                    destination = destination || GridPanel2;
                    var records = source.store.getRange();
                    source.store.removeAll();
                    Ext.each(records, function(record){
                        destination.store.addSorted(record);
                    });
                    Ext.net.Mask.hide();
                }
  5. #5
    Hi,

    Vladimir is right, mask is impossible in this case in according to the details that he mentioned. Mask is good, for example, for ajax requests.

    Apologize, my suggestion was wrong.
  6. #6
    Hi Vliadimir and Daniil,

    Thank you for the clarification.

Similar Threads

  1. [CLOSED] Grid Panel Masking Position is incorrect, Attached sample
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 10, 2011, 9:46 AM
  2. Two Grid Sample bug
    By YarikK78 in forum 1.x Help
    Replies: 1
    Last Post: Oct 31, 2011, 1:28 PM
  3. Grid with AutoSave sample
    By PetrSnobelt in forum 1.x Help
    Replies: 3
    Last Post: Apr 27, 2011, 11:33 AM
  4. Replies: 3
    Last Post: Mar 25, 2011, 9:55 AM
  5. Combinaiton Sample - Grid panel header Change
    By Sagar2529 in forum 1.x Help
    Replies: 0
    Last Post: Feb 10, 2011, 6:40 AM

Posting Permissions