[CLOSED] EventMask question on button click event

  1. #1

    [CLOSED] EventMask question on button click event

    My requirement: When I pressed the button "Btn1", it pop the notify window. When I choose "Yes ", I need show the EventMask with the message "Please wait..."; When I choose "No", It did not show the EventMask and return directly.

    The following is my code .
    But the the EventMask is not appear.
    How can I let it show when I choose "Yes"??


    <ext:Button ID="Btn1" runat="server" Text="Do">
        <DirectEvents>                
             <Click OnEvent="Btn1Click">        
                   <EventMask ShowMask="true" Msg="Please wait..." />
             </Click>                    
        </DirectEvents>                
    </ext:Button>                    
    
     
    protected void Btn1Click (object sender, DirectEventArgs e)
    {            
        X.Msg.Confirm("Info", "Are you sure do this?", new Ext.Net.MessageBoxButtonsConfig
        {        
            Yes = new Ext.Net.MessageBoxButtonConfig
            {    
                Handler = "App.direct. DoThing ()",
                Text = "Yes
            },    
            No = new Ext.Net.MessageBoxButtonConfig
            {    
                Text = "No"
            }    
        }).Show();    
    }            
                
            
    [DirectMethod]        
    public void DoThing()
    {            
    }
    Last edited by geoffrey.mcgill; Jan 03, 2014 at 3:06 AM. Reason: [CLOSED]
  2. #2
    Hi @wangyi,

    I am not sure I got the requirement well, but try this, please:
    Yes = new Ext.Net.MessageBoxButtonConfig
    {
        Handler = "App.direct.DoThing({ eventMask: { showMask: true, msg: 'Please wait ...' }})",
        Text = "Yes"
    }
    [DirectMethod]
    public void DoThing()
    {
        System.Threading.Thread.Sleep(3000); // just to ensure you'll the mask
    }

Similar Threads

  1. [CLOSED] question about click event
    By rosua in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 22, 2012, 7:07 AM
  2. [CLOSED] Question about Button Event Control
    By rosua in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 22, 2012, 5:36 AM
  3. Replies: 4
    Last Post: Nov 19, 2010, 1:39 PM
  4. Q: Button Listeners.Click Question
    By bruce in forum 1.x Help
    Replies: 1
    Last Post: Mar 17, 2009, 2:31 AM
  5. ASP.NET MVC Button Click question
    By Casbah in forum 1.x Help
    Replies: 0
    Last Post: Nov 19, 2008, 9:37 AM

Tags for this Thread

Posting Permissions