RadWin always open on pageLoad

3 posts, 1 answers
  1. Shaza
    Shaza avatar
    19 posts
    Member since:
    Apr 2011

    Posted 17 Aug 2011 Link to this post

    Hey,
    I'm trying to open two radWindows on two different radButtons click event from server side using the following code:
    newwindow1.ID = "RadWindow1";
                   newwindow1.DestroyOnClose = true;
                   newwindow1.NavigateUrl = "~/DocRelationBrowser.aspx?userid=" + user.UserID.ToString() + "&verid=" + selectedVersion.versionID.ToString() + "&rela=" + 0;
                   newwindow1.VisibleOnPageLoad = true;
                   newwindow1.AutoSize = true;
                   RadWindowManager1.Windows.Add(newwindow1);

    But the problem is the first time I hit button1-> everything go just fine.
    the first time I hit button2->both windows open (the one that button1 should open and the one button2 should open)!!
    How can I avoid that?
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Aug 2011 Link to this post

    Hello Shaza,

    This is the expected behaviour when set VisibleOnPageLoad property to True. This is so because the RadWindow is declared in  RadWindowManager preserves its ViewState which was not so in previous versions.
    check out the following forum which discussed the same.
    Stop RadWindow from always loading on page postback.

    Thanks,
    Shinu.
  3. Shaza
    Shaza avatar
    19 posts
    Member since:
    Apr 2011

    Posted 17 Aug 2011 Link to this post

    Thanks a lot .. EnableViewState = "false" worked perfect ! :)
Back to Top