How can i do Button EventMask Hide

  1. #1

    How can i do Button EventMask Hide

    Hello there

    According to that thread
    http://forums.ext.net/showthread.php...EventMask-Hide
    i would like to do the same but i would like to hide the mask only when download finished.
    The actual question is if there is any way to do the previous with out use the classic ajax way with IHttpHandler.

    Thx a lot for your time
    Last edited by asteriskgr; Jan 13, 2016 at 11:05 AM.
  2. #2
    Hello @asteriskgr! Welcome to Ext.NET Forums!

    There's no event bound to the end of a download on pages. This is not an Ext.NET nor ExtJS limitation, but browsers'. Unless you can bind the download to some event.

    When sending files to the server (upload) though, that is possible. Cause the server can send an ajax update to the page once the upload completes.

    Here are two examples showing browser interaction with client-bound and server-bound processes (that could be replaced by the upload of a file):
    - Progress Bar - Client Side Update
    - Progress Bar - Server Side Update

    There are some StackOverflow discussions on how to fire events after downloads complete in client-side:
    - Browser event when downloaded file is saved to disk
    - Browser download complete event

    Once you can successfully trigger the event, to remove the mask from a component, for example if it was defined with ID="myComponent", the command would be:

    Server-side (C#):
    // Adding mask:
    myComponent.SetLoading("Element is masked");
    myComponent.Element.Mask("Element is also masked.");
    X.AddScript("App.myComponent.mask()");
    
    // Removing it:
    myComponent.ClearLoading();
    X.AddScript("App.myComponent.unmask()");
    Client-side (javascript):
    App.myComponent.mask();
    App.myComponent.unmask();
    I hope this helps!
    Last edited by Daniil; Jan 14, 2016 at 9:55 AM.
    Fabrício Murta
    Developer & Support Expert
  3. #3

    Closed

    Dear fabricio.murta
    I appreciate a lot your try.
    Thx a lot for your instant answer.
    I will investigate your answer carefully and i will post my results.
  4. #4
    .Mask() and .Unmask() methods have been added for a Component.
    https://github.com/extnet/Ext.NET/issues/1227

    It will go to the v3.3 and v4.0 beta releases.

    By the way, there is also a .Call() method on a Component. You can use it to call any client side method from C#.
    myComponent.Call("mask", "mask message");
    myComponent.Call("unmask");
  5. #5
    Thanks Daniil!..

    In other words, from code behind (server side) now it will be possible to:

    myComponent.Mask();
    myComponent.Unmask();
    much like its javascript (client side) as shown on my first reply:
    App.myComponent.mask();
    App.myComponent.unmask();
    But that code behind approach will only be available once Ext.NET v3.3 (or the upcoming v4) are released. (while the javascript one is actual to the current 3.2.1 release).
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. How can i do Button EventMask Hide
    By fatihunal in forum 1.x Help
    Replies: 7
    Last Post: Jan 12, 2016, 4:22 PM
  2. Replies: 4
    Last Post: Jun 09, 2015, 5:08 PM
  3. Replies: 2
    Last Post: Mar 11, 2014, 6:55 AM
  4. [CLOSED] EventMask hide/disable
    By ndotis in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 08, 2011, 8:06 PM
  5. Replies: 4
    Last Post: Nov 19, 2010, 1:39 PM

Tags for this Thread

Posting Permissions