This is a migrated thread and some comments may be shown as answers.
RadWindow Not refreshing on Load
10 Answers 183 Views
This is a migrated thread and some comments may be shown as answers.
Nasiem
Top achievements
Rank 1
Nasiem asked on 16 Sep 2010, 08:43 PM
Hi Team,
I have a RadWinows popup that i open on Clianient side using radOpen(). The problem i'm having is that in IE7 when the popup opens it doesn't refresh the page. I have a popup rad window with controls on on it and two buttons Save and Cancel. If i open the popup then edit the controls on the popup window and click cancel. When I open the popup again i see that the controls on the popup still have the same values in it even though i pressed cancel in IE8 this problem isn't hapenning. So that for IE7 I had to use the RelodOnShow proprty in the RadWindowManager to refersh the popup on load. But this is making the load of the popup very very slow. Is there away i can refresh the rad window who or make it work properly in IE7. 
Thanks
Nasiem

10 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Sep 2010, 02:16 PM
Hi Nasiem ,

Based on the information that you provided so far, I would suggest one of the following approaches:
  1. Use ReloadOnShow=true and ShowContentDuringLoad=false for the RadWindowManager
  2. Use the OnClientClose property and set in it a name of JavaScript function, where you navigate the content page to a blank one.

Best wishes,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Aleah Dillon
Top achievements
Rank 1
answered on 23 Sep 2010, 04:16 PM
We are seeing this same issue. We used your three suggestions and are seeing no change.  We are experiencing this issue in both IE7 and IE8. 

Window on page:
<telerik:RadWindow animation="None" KeepInScreenBounds="true" VisibleStatusbar="false" Runat="server" EnableEmbeddedSkins="false" Width="350" Height="250" Id="radWindowFirstAndLastNameSearch" NavigateUrl="~/PopupNotification.aspx?action={0}&firstName={1}&lastName={2}" Behavior="Close" IconUrl="NonExistantImage.gif" ReloadOnShow="true" ShowContentDuringLoad="false" OnClientClose="BlankMe" />

Code to pop window:
protected void ShowRadWindow(RadWindowManager radManager, RadWindow radWindow, object[] Args)
{
RadWindow selectedWindow = radManager.Windows[radManager.Windows.IndexOf(radWindow)];
selectedWindow.EnableViewState = false;
selectedWindow.NavigateUrl = ResolveUrl(string.Format(radWindow.NavigateUrl, Args));
selectedWindow.VisibleOnPageLoad = true;
}








We use server-side code to pop the window.
Javascript OnClientClose:
        function BlankMe(radWindow) {
            radWindow.SetUrl("");
            radWindow.Reload();
        }

This behavior is happening on every RadWindow we open. Please advice.




0
Aleah Dillon
Top achievements
Rank 1
answered on 23 Sep 2010, 04:55 PM
We were unable to make this work server-side, but we did find a client-side work-around.  We only want to pop the window if more than one search result was returned so in our server-side function we are now doing this:

RadAjaxManager.GetCurrent(this.Page).ResponseScripts.Add(string.Format("OpenSearchWindow('{0}','{1}','{2}');"PopupActions.ACTION_SEARCH_DUPLICATE_CALLER.ValueAsInt(), radFirstName.Text, radLastName.Text));

Then our Javascript function will set the url and open the window as follows:

        function OpenSearchWindow(action, firstname, lastname) {

            var radWindow = $find("<%= radWindowFirstAndLastNameSearch.ClientID  %>");

            radWindow.SetUrl(radWindow.GetUrl() + "?action=" + action + "&firstName=" + firstname + "&lastName=" + lastname);
            radWindow.Show();
        }

This actually reloads the page as you would expect.  Doing these same actions (setting the url and showing the window) server-side does not function as expected and we see the same results every time no matter what search criteria we pass in.  Hope someone finds this work-around helpful.

Aleah
0
Rajesh
Top achievements
Rank 2
answered on 21 Oct 2010, 01:03 AM
yes this is the solution what i want...
0
Chris
Top achievements
Rank 2
answered on 27 Oct 2010, 05:47 PM
I'm seeing this same behavior in IE only.  Chrome is working as expected.  I haven't tried other browsers at this time.  I'm running the latest build (2010.2 929).  This is just on a simple popup where it doesn't call the Page_Load if it's the same QueryString coming in as a previous one.

<telerik:RadWindow ID="winModalWindow" runat="server" SkinID="Modal" Title="" Height="800px" Width="800px" VisibleStatusbar="false" ReloadOnShow="true" ShowContentDuringLoad="false" OnClientClose="radWindow_SetBlank" />


here is my javascript:
     function OpenEditUser(URL, Title) {

       var oManager = GetRadWindowManager();

       //Get an existing window DialogWindow using getWindowByName
       var oWnd = oManager.getWindowByName("winModalWindow");

       oWnd.set_title(Title);
       oWnd.setUrl(URL);
       oWnd.setSize(800, 475);
       oWnd.set_clientCallBackFunction("EditUser_PopupCallback");
       oWnd.show();
     }
function OpenEditUser(URL, Title) {
 
  var oManager = GetRadWindowManager();
 
  //Get an existing window DialogWindow using getWindowByName
  var oWnd = oManager.getWindowByName("winModalWindow");
 
  oWnd.set_title(Title);
  oWnd.setUrl(URL);
  oWnd.setSize(800, 475);
  oWnd.set_clientCallBackFunction("EditUser_PopupCallback");
  oWnd.show();
}
0
Chris
Top achievements
Rank 2
answered on 27 Oct 2010, 06:28 PM
FYI, I created a work around by added a randomly generated number to the querystring through a common Javascript function used to open the RadWindow.  This caused the querystring to be different every time and causes the RadWindow to refresh.

function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
 
function OpenModalRadWindow(URL, Title, width, height, callBackFunction) {
 
 
    if (URL.indexOf("?") != -1) {
        URL = URL + '&'
    }
    else {
        URL = URL + '?'
    }
 
    var GUID = guid().replace('-', '');
 
    URL = URL + GUID.substring(3, 4) + '=' + GUID.substring(6, 2);
 
 
    var oManager = GetRadWindowManager();
 
    //Get an existing window DialogWindow using getWindowByName
    var oWnd = oManager.getWindowByName("winModalWindow");
 
 
    oWnd.set_title(Title);
    oWnd.SetUrl(URL);
    oWnd.setSize(width, height);
    oWnd.set_clientCallBackFunction(callBackFunction);
    oWnd.show();
 
}
 
function radWindow_SetBlank() {       
    var oManager = GetRadWindowManager();
    var oWnd = oManager.GetWindowByName("winModalWindow");
    oWnd.setUrl("about:blank");
}
 
function S4() {
    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
function guid() {
    return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
0
Fiko
Telerik team
answered on 02 Nov 2010, 09:39 AM
Hello Chris,

Setting ReloadonShow="true" property of the RadWndow control uses the same approach (using GUIDs in the URL) but it does not require any code to be written.

Regards,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Prashant Upreti
Top achievements
Rank 1
answered on 29 Jul 2015, 07:12 PM

I am using 

GetRadWindowManager().getActiveWindow().SetUrl(url)

But when Control is loaded data inside is not refreshed , neither we are hitting PageLoad

Do we know a way to force page to refresh​

0
Prashant Upreti
Top achievements
Rank 1
answered on 29 Jul 2015, 07:13 PM
I am using 
GetRadWindowManager().getActiveWindow().SetUrl(url)
But when Control is loaded data inside is not refreshed , neither we are hitting PageLoad
Do we know a way to force page to refresh​
0
Vessy
Telerik team
answered on 03 Aug 2015, 03:31 PM
Hi Prashant,

Can you provide a little more details on the exact scenario you are trying to achieve? It will be really helpful if you isolate the issue into a simplified runnable project and send it so we can reproduce and examine it on our side.

Looking forward to receiving a reply from you,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Nasiem
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Aleah Dillon
Top achievements
Rank 1
Rajesh
Top achievements
Rank 2
Chris
Top achievements
Rank 2
Fiko
Telerik team
Prashant Upreti
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or