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

Radwindow is not refreshing in Mozilla Firefox browser

6 Answers 95 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Purnasekhar
Top achievements
Rank 1
Purnasekhar asked on 19 Jul 2011, 06:24 AM
Hi All,
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);

}
}

Please help me.

Thanks
sekhar

6 Answers, 1 is accepted

Sort by
0
Kiara
Top achievements
Rank 1
answered on 19 Jul 2011, 09:57 AM
This sample works OK under IE, FF and Chrome:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

The code snippets are very similar to yours, compare them to see what you need to correct to get everything right.

Kiara
0
Purnasekhar
Top achievements
Rank 1
answered on 19 Jul 2011, 11:29 AM
Hi Kiara,

thank you.
In parent page, linkbutton is not there inside the radgrid,it is placed at outside the grid.

Sekhar 

0
Brijesh Gadhiya
Top achievements
Rank 1
answered on 30 Aug 2012, 06:27 PM
Hi
I am running into the same problem. The radwindow works fine in IE9 and chrome but fails to work in Mozilla. The link to the example you have given is too basic. I have a slight different implementation. I am creating an aspx page that contains RadCombobox and update/cancel button. I have tied these button with the following code as mentioned in the Telerik documentation.

btnUpdate.Add("onclick", "javascript:JSControl_RadWindow_NetworkMappingsOnClient.Add();");
btnCancel.Attributes.Add("onclick", "javascript:JSControl_RadWindow_NetworkMappingsOnClient.Cancel();");

there is also a server side event hooked up with the Update button.

When I click the update button in IE9 or Chrome the server side method is correctly called and datagrid gets updated accordingly. However this is not the case with Mozilla firefox 15.0. Am i missing a version update on Telerik?
Please advise
Thanks
Brijesh

0
Marin Bratanov
Telerik team
answered on 03 Sep 2012, 01:18 PM
Hello Brijesh,

I advise that you check your code for JavaScript errors which is the most likely reason for your problem. The demo Kiara linked uses a server-side handler for the update button which calls the client-side functions that close the RadWindow and then rebind the grid. I just tested it in Firefox 15 and it is working fine, so I suggest that you compare your code with the demo and find the difference that is causing the issue. I also see in your account that you have donwloaded a version from 2009, so I suggest you upgrade to the latest, because many browser issues have been fixed with the later versions, especially since Firefox also started to produce new versions every couple of months.


All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Brijesh Gadhiya
Top achievements
Rank 1
answered on 03 Sep 2012, 02:54 PM
Ok. I will try downloading the new version of telerik and check to see if this problem persist. Will keep you updated. Thanksbrijesh
0
Brijesh Gadhiya
Top achievements
Rank 1
answered on 25 Sep 2012, 11:54 PM
Thanks
Tags
General Discussions
Asked by
Purnasekhar
Top achievements
Rank 1
Answers by
Kiara
Top achievements
Rank 1
Purnasekhar
Top achievements
Rank 1
Brijesh Gadhiya
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or