HI,
I,m using RadWindow as a poupup to set some values in code behind but i want to close popup after setting these values which is not working.
To close RadWindow popup i,m using the following code
protected void btnMEOK_OnClick(object sender, EventArgs e)
{
int i = txtMENewPassword.Text.Trim().CompareTo(txtMEConfirmNewPassword.Text.Trim());
if (i == 0)
{
m_Password = txtMENewPassword.Text;
lblMESetPassowordError.Text = "";
// cloase the window
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", true); // Call client method
in radwindow page
}
else
lblMESetPassowordError.Text = "New password and confirm new password should be same.";
}
JavaScript Code:
function CloseAndRebind()
{
GetRadWindow().Close();
//GetRadWindow().BrowserWindow.refreshGrid(null);
}
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
return oWindow;
}
Which is calling "CloseAndRebind()" function from code behind.
please help!
Regards
Ravi
I,m using RadWindow as a poupup to set some values in code behind but i want to close popup after setting these values which is not working.
To close RadWindow popup i,m using the following code
protected void btnMEOK_OnClick(object sender, EventArgs e)
{
int i = txtMENewPassword.Text.Trim().CompareTo(txtMEConfirmNewPassword.Text.Trim());
if (i == 0)
{
m_Password = txtMENewPassword.Text;
lblMESetPassowordError.Text = "";
// cloase the window
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", true); // Call client method
in radwindow page
}
else
lblMESetPassowordError.Text = "New password and confirm new password should be same.";
}
JavaScript Code:
function CloseAndRebind()
{
GetRadWindow().Close();
//GetRadWindow().BrowserWindow.refreshGrid(null);
}
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
return oWindow;
}
Which is calling "CloseAndRebind()" function from code behind.
please help!
Regards
Ravi