This is a migrated thread and some comments may be shown as answers.

Could not redirect from Radwindow and window also not closing?

1 Answer 62 Views
Window
This is a migrated thread and some comments may be shown as answers.
shaik
Top achievements
Rank 1
shaik asked on 09 Jun 2009, 02:07 PM
Hi Telerik Team,

 

     I open a popup by using code shown below and want to close it and send notification back to the original page once a user clicks on the save button within this popup.

    Original Page Code:

<telerik:radwindowmanager id="RadWindowManager1" runat="server" skin="Office2007">

<Windows>

<telerik:RadWindow ID="rwHazard" runat="server" Height="500px" Width="700px" Left="300px"> </telerik:RadWindow>

</Windows>

</telerik:radwindowmanager>

Page_Load()

{

Response.Redirect("~/IH_Module/Assessment_Dashboard.aspx?Module_ID=22&HazardIDType=" + HazardIDType);

}

Popup page code:

ASPX

<script type="text/javascript">

function GetRadWindow()

{

var oWindow = null;

if (window.radWindow) oWindow = window.radWindow;

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;

return oWindow;

}

function CallParentWindow()

{

var oWindow = GetRadWindow();

CloseWindow()

}

function CloseWindow()

{

var oWindow = GetRadWindow();

oWindow.BrowserWindow.location.reload();

oWindow.Close();

}

function Close()

{

var oWindow = GetRadWindow();

oWindow.Close();

}

</script>

<asp:Label ID="InjectScriptLabel" runat="server" Text=""></asp:Label>

protected void btnSelect_Click(object sender, EventArgs e)

{

try

{

string sHazardName = string.Empty;

string sHazardType = string.Empty;

string sHazardIDType = string.Empty;

 

foreach (Telerik.Web.UI.GridDataItem dataItem in rdHazard.SelectedItems)

{

if ((sHazardIDType.Trim().Length == 0))

{

sHazardIDType = dataItem.Cells[3].Text.ToString();

}

else

{

sHazardIDType = sHazardIDType + "^" + dataItem.Cells[3].Text.ToString();

}

}

if (sHazardIDType == "")

{

throw new Exception("Please select a hazard");

}

Response.Redirect("~/IH_Module/Assessment_Dashboard.aspx?Module_ID=22&HazardIDType=" + HazardIDType);

InjectScriptLabel.Text = "<script>CallParentWindow()</" + "script>";

}

catch (Exception ex)

{

PMAP_Common_Methods.DisplayUserMessage(ex.Message);

}

}



1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 11 Jun 2009, 03:23 PM
Hello Shaik,

We are sorry but we cannot reproduce the scenario on our side. We are much willing to help, but we will need your further cooperation. Could you please, open an new support ticket and send us a full runnable sample which reproduces the issue that you experience, so that we can recreate the problem and hopefully provide a solution?

Regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
shaik
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or