Load mask from code behind

Page 1 of 2 12 LastLast
  1. #1

    Load mask from code behind

    Hi!

    Is it posible to show a load mask stating "Loading..." when the user click a button and some operations are happening behind ?

    Thanks!
  2. #2
    For mask page in the click listener handler code use following:
       Ext.getBody().mask('Loading...');
       Ext.getBody().unmask();
  3. #3
    Quote Originally Posted by nightik View Post
    For mask page in the click listener handler code use following:
       Ext.getBody().mask('Loading...');
       Ext.getBody().unmask();
    Thanks!
    Can i do this from c# ?
  4. #4
    Do you use DirectEvent?

    If so, please use EevntMask.

    Example
    <ext:Button runat="server" Text="Test">
        <DirectEvents>
            <Click OnEvent="Button_Click">
                <EventMask ShowMask="true" Msg="Loading..." />
            </Click>
        </DirectEvents>
    </ext:Button>
  5. #5
    Would this be possible by using
    X.Body().Mask("Executing query..."); ?

    I've tried this, but it didn't work...
    Last edited by maephisto; Apr 13, 2011 at 1:47 PM.
  6. #6
    In the DirectEvent handler?

    Well, .Mask() method generates the script to show a mask, but it's executed when the response is parsed on client side.
  7. #7
    I need to do it like this :
    On the buttons OnDirectClick="btnExecute_Click" event, show the mask, do some work in the background, fill some grids, and after that unmask everything.
    I need the mask so that the user knows that work is being done in the background.
  8. #8
    The solution is in the #4 post on this thread.
  9. #9
    Thanks! Could you please be more specific ?
    I've tried the solution in post #4 , i can see the mask for a few moments and after that vanishes.
    Can I control when the mask dissapears ?
  10. #10
    Well, if the mask disappears, it means that DirectEvent's response came on the client from server and parsed.

    To hide a mask when you wish, please use the following config:
    <ext:Button runat="server" Text="Test">
        <DirectEvents>
            <Click OnEvent="Button_Click" Before="Ext.net.Mask.show('Loading...');" />
        </DirectEvents>
    </ext:Button>
    Then call
    Ext.net.Mask.hide()
    in any moment you wish.
Page 1 of 2 12 LastLast

Similar Threads

  1. Load Mask via JS?
    By Tbaseflug in forum 1.x Help
    Replies: 6
    Last Post: Feb 16, 2010, 12:34 PM
  2. Replies: 0
    Last Post: May 21, 2009, 2:02 PM
  3. load mask for body
    By [WP]joju in forum 1.x Help
    Replies: 7
    Last Post: Mar 16, 2009, 4:29 AM
  4. Disable Load Mask On Event
    By Tbaseflug in forum 1.x Help
    Replies: 3
    Last Post: Jan 09, 2009, 3:06 PM
  5. [CLOSED] GridPanel load mask
    By peterdiplaros in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 14, 2008, 3:17 PM

Tags for this Thread

Posting Permissions