[CLOSED] EventMask add from code behind (with customtarget option) and handle when it should disapear

  1. #1

    [CLOSED] EventMask add from code behind (with customtarget option) and handle when it should disapear

    Hi,
    Like in title. I've found answer on second part(handle when disapear) of question here: post

    I have write this code but there is no setter in EventMask of DirectEvents:
    DirectEvents.Click.EventMask = new EventMask
                                                               {
                                                                   Target = MaskTarget.CustomTarget,
                                                                   Msg = "Please wait...",
                                                                   CustomTarget = "#{FormPanel}",
                                                                   ShowMask = true
                                                               };
    How should it be done? with DirectEvents.Click.Before

    Thanks,
    ViDom
    Last edited by Daniil; May 21, 2013 at 3:42 AM. Reason: [CLOSED]
  2. #2
    Hi @ViDom,

    I think it should be done like this.
    DirectEvents.Click.EventMask.Target = MaskTarget.CustomTarget;
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @ViDom,

    I think it should be done like this.
    DirectEvents.Click.EventMask.Target = MaskTarget.CustomTarget;
    Yeah you are right. But how should I add CustomTarget with #{control.ID} or something like that? or just apply control.ClientID to CustomTarget property of EventMask?
  4. #4
    Quote Originally Posted by ViDom View Post
    Yeah you are right. But how should I add CustomTarget with #{control.ID} or something like that? or just apply control.ClientID to CustomTarget property of EventMask?
    Yes, you are right. You should use CustomTarget property:

    @(Html.X().Button()
    	.Text("Click Me, now!")
    	.ID("MyButton")
    	.DirectEvents(de => {
    		de.Click.Url = Url.Action("UpdateTimeStamp");
    		de.Click.EventMask.CustomTarget = "#{MyButton}";
    		de.Click.EventMask.Target = MaskTarget.CustomTarget;
    		de.Click.EventMask.Msg = "My mask!";
    		de.Click.EventMask.ShowMask = true;
    	})
     )
  5. #5
    This should do the job as well. In the context of WebForms.
    de.Click.EventMask.CustomTarget = MyButton.ClientID;

Similar Threads

  1. [CLOSED] Nested border layouts causing layout disapear
    By ViDom in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 27, 2012, 7:31 AM
  2. EventMask on two CustomTarget at the same time
    By slonati_adv in forum 2.x Help
    Replies: 1
    Last Post: Sep 25, 2012, 11:32 AM
  3. How to use a CustomTarget on an EventMask?
    By paul-2011 in forum 1.x Help
    Replies: 1
    Last Post: Aug 11, 2010, 6:31 AM
  4. Replies: 8
    Last Post: Jun 25, 2010, 2:53 PM
  5. Replies: 0
    Last Post: Jun 08, 2010, 6:55 AM

Tags for this Thread

Posting Permissions