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

Radwindow not refreshing Rad Control Values in Firefox

1 Answer 72 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Parik
Top achievements
Rank 1
Parik asked on 16 Aug 2013, 04:07 PM
I am using a RadWindow (which is being called from a parent window as a pop up) inside a aspx page.
Inside the rad window i have a Rad Text box and a Rad DateTime picker.
Refresh button and close button is Enabled for the rad window.

the radcontrols are populated to default values at the page load time.
Now if i select a date from date time picker and enter a number in the text box and click on the refresh button the values inside the text box and the date time picker remains what i have entered and selected. It should be defaulted back to the original values.

However this is happening only in Mozilla Firefox but this works fine in IE and Chrome.

Does anyone know what could be the cause or is that a bug in Firefox.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 21 Aug 2013, 09:52 AM
Hello Parik,

The refresh button RadWindow offers can merely invoke the window.reload() method of the content iframe. At this point the browser takes over and things depend on the browser and ASP from then on. If a postback has already occurred on the page the most likely effect is that a browser prompt will appear that will ask the user if the last POST should be repeated.

Some browsers attempt to keep forms data and this may also have taken place.

What I can suggest is using the OnClientCommand event and replace the default reload action with replacing the URL of the page with a random querystrgin, which is what the ReloadOnShow feature of the control does. Here is an example how you can use the methods RadWindow already has:
function OnClientCommand(sender, args)
{
    if (args.get_commandName() == "Reload")
    {
        args.set_cancel(true);
        var changedUrl = sender._getReloadOnShowUrl(sender.get_navigateUrl());
        sender.setUrl(changedUrl);
    }
}



Regards,
Marin Bratanov
Telerik
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 the blog feed now.
Tags
General Discussions
Asked by
Parik
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or