Reqirement:
I am using radwindow in my application.In parent page i have one linkbutton,if i click on that link popup window will open.In popup window one save button is there.i will select one row in that popup then i click on save button,Popup will close & parent grid has to refresh.
Above reqirement is woking fine in IE .but it is not working in Mozilla Firefox browser.Please find the code below in Parent & child pages.
Parentpage:
Design page:
<
telerik:RadAjaxManager ID="radAjaxManager" runat="server" OnAjaxRequest="radAjaxManager_AjaxRequest"
DefaultLoadingPanelID="radAjaxLoadPanel">
</telerik:RadAjaxManager>
function
refreshGrid(arg)
{
if (!arg) {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
function OnClientclose(sender, eventArgs) {
if (!eventArgs) {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= radAjaxManager.ClientID %>").ajaxRequest("RebindAndNavigate");
}
Code Page:
protected void radAjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind" || e.Argument == "RebindAndNavigate")
{
using (DataContext db = new DataContext())
{
db.ObjectTrackingEnabled = false;
LoadCountry(db);
LoadConcept(db);
fileUpload.Visible =
true;
if (Convert.ToInt16(ddlFileType.SelectedValue) != Convert.ToInt16(ConceptAttachmentType.Board))
{
grvConcept.DataSource = null;
grvConcept.DataBind();
grvConcept.Visible = false;
}
}
}
}
Child Page:Design Page:
function CloseAndRebind(args) {
GetRadWindow().BrowserWindow.refreshGrid(args);
GetRadWindow().Close();
}
function GetRadWindow() {
var varWindow = null;
if (window.radWindow) varWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) varWindow = window.frameElement.radWindow; //IE (and Moz as well)
return varWindow;
}
Code page:
protected
void btnSave_Click(object sender, EventArgs e)
{
.................objMsg.ShowMessage(
"Add filler", "Saved Successfully", (Int16)MessageType.SUCCESS);
ScriptManager.RegisterStartupScript(this.updProjectCreation, this.GetType(), "strScript", "javascript: CloseAndRebind()", true);
}
}
Thanks
sekhar