Opening a popup shows previously opened data for a second !?!

8 posts, 0 answers
  1. Brad
    Brad avatar
    11 posts
    Member since:
    Mar 2008

    Posted 02 Dec 2008 Link to this post

    I've got a RadGrid, and when double-clicking on a row, client-side javascript kicks in by openning up a pop-up Window:

     

     

    function ShowEditForm2(id, rowIndex)

     

    {

     

        ....
                    var oWnd = window.radopen("AddConsultant2.aspx?consultantid=" + id, "EditDialog"); 
                    oWnd.SetSize(650,400);
        ....
    }

    I can close this pop-up window, then go ahead and open it up again by double-clicking on another row back on the RadGrid.

    This is all working fine, however I notice that the second time (and subsequent times after the second time) the pop-up window is openned, it will display the data from the previously openned instance (just for a second). Then immediately the correct data on the pop-up window gets rendered. This is somewhat annoying; is there a way to 'refresh' this? It seems to cache the display.

  2. Brad
    Brad avatar
    11 posts
    Member since:
    Mar 2008

    Posted 03 Dec 2008 Link to this post

    Hello...?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Dec 2008 Link to this post

    Hello Brad,

    Try setting ShowContentDuringLoad to false and ReloadOnShow to true. This should produce the desired effect.


    Regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 04 Dec 2008 Link to this post

    I also tried setting the RadWindowManager DestroyOnClose to true, that made it appear to load a fresh page every time.  Although I'd trust Georgi's method more than my findings. :)
  6. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Dec 2008 Link to this post

    Hello again,

    Serrin, thank you your confidence in me ;)
    I see that my reply was a bit too short, so I hope that the information below will be shed some light on this issue.

    Basically, by design when a RadWindow is closed, its object is not destroyed - the window remain hidden on the page. This is done in order to provide a caching feature so the window could come up fast when called again.
    In some scenarios however you need to show a new version of the content page every time RadWindow is called. In such case, you can use different approaches depending on the specific scenario:
    1. Use ReloadOnShow=true and ShowContentDuringLoad=false. This way RadWindow will reload the page every time it is shown, but because ShowContentDuringLoad is set to false, users will not see the old version of the page.
    2. Use DestroyOnClose=true. When this property is set, the window object is destroyed once RadWindow is closed. Note however, that in such scenario, you will not be able to open the same RadWindow again untill the whole page is reloaded. That is why if you set DestroyOnClose to true, you will need to either use the client-side API to control the RadWindow look and behavior every time you open it (setSize(), setUrl(), set_modal() etc.), or to set all the needed properties in the RadWindowManager's declaration.
    3. Hook to the OnClientClose eventhandler and change the Url of the RadWindow when it is closed. Set the Url again when you open the window.
    I hope this helps.


    Best wishes,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Bram van den Broek
    Bram van den Broek avatar
    6 posts
    Member since:
    May 2005

    Posted 08 Dec 2008 Link to this post

    Hello Georgi,

    I have had the same issue, but if you set ShowContentDuringLoad="false" the radwindow will not open in the correct screen size after opening. It will first open as a smaller window (correct height and narrower width) and than resize to the actual user defined window size.

    With kind regards,

    Bram
  8. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Dec 2008 Link to this post

    Hi Bram,

    I am not familiar with such problem and I was not able to reproduce it locally. Could you please open a support ticket and send me a project where this behavior could be reproduced? I will check it right away.


    Regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. Billy
    Billy avatar
    4 posts
    Member since:
    Mar 2015

    Posted 07 May 2015 in reply to Georgi Tunev Link to this post

    SAME ISSUE! The above was not helpful.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017