How can i do Button EventMask Hide

  1. #1

    How can i do Button EventMask Hide

    Hi All,

    	<ext:Button ID="ButtonXML" runat="server" Text="XML" Icon="PageCode">
    						<DirectEvents>
    						<Click OnEvent="ExportEt" IsUpload="true">
    						<ExtraParams>
                                                        <ext:Parameter
                                                            Name="data"
                                                            Value="#{GridPanel1}.getRowsValues()"
                                                            Mode="Raw"
                                                            Encode="true" />
                                                            <ext:Parameter Name="format" Value="xml" Mode="Value" /> 
                                                    </ExtraParams>
    									<EventMask ShowMask="true" MinDelay="500" Msg="Satırlar XML 'e çıkarılıyor..." />
    								</Click>
                                            </DirectEvents> 
    						</ext:Button>
    When button fired EventMask is showing. How can i do close/hide eventmask delayed 500 millisec.
    Thanks for yours help.
  2. #2
    Hi,

    Please set a Before handler like this.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void TestDirectEventHandler(object sender, DirectEventArgs e)
        {
            X.Msg.Alert("DirectEvent", "Hello from Server!").Show();
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
    
        <script type="text/javascript">
            var onBefore = function () {
                Ext.net.Mask.show();
                Ext.net.Mask.hide.defer(500);
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Button runat="server" Text="DirectEvent">
                <DirectEvents>
                    <Click OnEvent="TestDirectEventHandler" Before="onBefore();" />
                </DirectEvents>
            </ext:Button>
        </form>
    </body>
    </html>
  3. #3
    Thanks for your speedy reply and solutions.
  4. #4
  5. #5

    Not acceptable solution for most of cases

    Dear Daniil

    I would like to mention that the solution you have provided is not working on ext 4. As reference for a working solution for the latest is the above link.
    http://danielkunnath.com/post/535294...ion-in-extjs-4
    Also i think that this is also a not acceptable solution for show mask while download a file because the interval of showing mask is preset but what will happen if the file need more that 500 ms to download?

    Thanks for your time
  6. #6
    Hello, just a heads up, the solution above was built for Ext.NET v1, which uses ExtJS 3. That's probably the cause the solution does not work on ExtJS 4.
    Fabrício Murta
    Developer & Support Expert
  7. #7

    Not acceptable solution for most of cases

    Dear fabricio.murta you are absolutely right.
    But i insist that this solution is not a serious solution. (preset the interval of mask showing) .

    Thx for your time.
  8. #8
    Hello,

    You are right that this is not suitable for most cases, but as the original question says, the user explicitly asked for the solution with 500ms delay.

    If you need a solution for a different scenario and Ext.NET version, I'd recommend you to open a new thread on the corresponding forum and with your actual requirements.
    Last edited by geoffrey.mcgill; Jan 12, 2016 at 5:43 PM.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: Nov 28, 2011, 7:20 AM
  2. [CLOSED] EventMask hide/disable
    By ndotis in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 08, 2011, 8:06 PM
  3. Hide refresh button in ComboBox
    By venu.sn2009 in forum 1.x Help
    Replies: 2
    Last Post: Jun 15, 2011, 10:00 AM
  4. Replies: 4
    Last Post: Nov 19, 2010, 1:39 PM
  5. Replies: 1
    Last Post: Mar 03, 2009, 12:15 PM

Tags for this Thread

Posting Permissions