RadWindow Not refreshing on Load

11 posts, 0 answers
  1. Nasiem
    Nasiem  avatar
    9 posts
    Member since:
    May 2009

    Posted 16 Sep 2010 Link to this post

    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
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 21 Sep 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Aleah Dillon
    Aleah Dillon avatar
    6 posts
    Member since:
    Jan 2009

    Posted 23 Sep 2010 Link to this post

    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.




  5. Aleah Dillon
    Aleah Dillon avatar
    6 posts
    Member since:
    Jan 2009

    Posted 23 Sep 2010 Link to this post

    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
  6. Rajesh
    Rajesh avatar
    2 posts
    Member since:
    Aug 2010

    Posted 20 Oct 2010 Link to this post

    yes this is the solution what i want...
  7. Chris
    Chris avatar
    15 posts
    Member since:
    Sep 2007

    Posted 27 Oct 2010 Link to this post

    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();
    }
  8. Chris
    Chris avatar
    15 posts
    Member since:
    Sep 2007

    Posted 27 Oct 2010 Link to this post

    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());
    }
  9. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 02 Nov 2010 Link to this post

    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
  10. Prashant Upreti
    Prashant Upreti avatar
    2 posts
    Member since:
    Sep 2009

    Posted 29 Jul 2015 in reply to Fiko Link to this post

    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​

  11. Prashant Upreti
    Prashant Upreti avatar
    2 posts
    Member since:
    Sep 2009

    Posted 29 Jul 2015 in reply to Georgi Tunev Link to this post

    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​
  12. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 03 Aug 2015 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017