This is a migrated thread and some comments may be shown as answers.
Radwindow OnClientClose
1 Answer 37 Views
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 19 Sep 2012, 08:33 PM

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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 20 Sep 2012, 06:12 AM
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.
Asked by
JJ
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or