Radwindow OnClientClose

2 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 19 Sep 2012 Link to this post

    After I use server code to open radwindow,

    RadWindow selectAccountWindow = (RadWindow)this.Master.FindControl("wndForceSelectAccount");
              selectAccountWindow.VisibleOnPageLoad = true;

    I am not able to trigger OnClientClose client side javascript. Is there anyway I can trigger OnClientClose happen?

    Thanks
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 Sep 2012 Link to this post

    Hi,

    Try the following code to achieve your scenario.

    Content Page
    C#:
    protected void Button1_Click(object sender, EventArgs e)
    {
      RadWindow Window = (RadWindow)this.Master.FindControl("RadWindow1");
      Window.OnClientShow = "OnClientShow";
    }

    Master Page
    JS:
    <script type="text/javascript">
        function OnClientShow(sender, args)
        {
            sender.close();
        }
        function OnClientClose()
        {
           // Your Code
        }
    </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top