Showing posts with label telerik. Show all posts
Showing posts with label telerik. Show all posts

Wednesday, February 5, 2014

rad window open and close using rad button

code sample

protected void RadButton1_Click(object sender, EventArgs e)
{
    //pass the ClientID of the RadWindow to open
    string script = "function f(){Open('"+RadWindow1.ClientID+"'); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
}
protected void RadButton2_Click(object sender, EventArgs e)
{
    //pass the ClientID of the RadWindow to close
    string script = "function f(){Close('" + RadWindow1.ClientID + "'); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
}