Closed RadWindows reappear on postback

5 posts, 0 answers
  1. Per Granaune
    Per Granaune avatar
    11 posts
    Member since:
    Feb 2010

    Posted 21 Sep 2010 Link to this post

    I use RadControls for ASP.NET AJAX Q1 2010.

    One of my aspx-pages contain two different usercontrols, which both
    open up a radwindow after a postback/button-push.

    What happens is that if I've opened one of the windows, and closed it,
    it will REAPPEAR when I try to open the radwindow from the other
    usercontrol.

    So - open first radwindow (postback) => OK.
    Open second radwindow (postback) => Both windows open.

    The same thing happens when refreshing the browser - If I've
    had, say, a dozen radwindows open, they will reappear one by one.

    What is it that I've done wrong or forgotten?
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 22 Sep 2010 Link to this post

    Hello Per,

    Set EnableViewState=false for the RadWIndowManager that you are using - this should help you achieve the desired behavior.

    Kind regards,
    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. Per Granaune
    Per Granaune avatar
    11 posts
    Member since:
    Feb 2010

    Posted 22 Sep 2010 Link to this post

    I tried setting EnableViewState="false" for both RadWindowManagers, in
    the two different user controls, but it made no difference!

    To make it simple, I'll call the RadWindow opened from control 1 for "A", and
    the RadWindow opened from control 2 for "B":

    What I've figured out, is that when opening A, B is never opened - even if it has been opened before.
    Opening B always open A, if it has been previously opened.

    Page refresh opens both A and B, but I've figured out why:

    Both of the user controls have a section like this in Page_Load:

    if (IsPostBack)
    {
        var arg = Page.Request["__EVENTARGUMENT"];
        DoSomething(arg);
    }

    The DoSomething-methods will ignore the argument caused by the other control,
    but since refreshing the browser, the last __EVENTARGUMENT is repeated,
    either A will open (alone) or B (together with A).

    I might have to go for something else than postback triggered clientside from anchors,
    but the really puzzling part is why opening B always reopens A, if it's previously been opened.
    Opening A never reopens B.

    The RadWindows are added to the (empty) RadWindowManagers serverside,
    and I've tried to set VisibleOnPageLoad = "false", but then the windows never appear
    at all.

    Anything else I've not thought about?
  4. Per Granaune
    Per Granaune avatar
    11 posts
    Member since:
    Feb 2010

    Posted 23 Sep 2010 Link to this post

    I finally realized that the RadWindow that kept popping up together with the other,
    didn't have the "VisibleOnPageLoad="false" EnableViewState="false"" settings on its
    RadWindowManager.

    Now the windows only appear alone - but I'm still not able to avoid the reappearance of
    the last opened RadWindow when the browser is refreshed.

    Shouldn't EnableViewState="false" be enough?
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 23 Sep 2010 Link to this post

    Hello Per,

    Basically, if EnableViewState is set to true, all RadWindows' properties that are set from the server will be saved in the viewstate and applied again on the next postback. I am not quite sure that I understand your setup completely however, so at this point I cannot tell whether there is a problem with that property or not. If you believe that there is a bug in this functionality, please open a support ticket and send us a sample project so we can investigate further. Of course if there is a problem, we will do our best to fix it right away.


    Kind regards,
    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
Back to Top