This is a migrated thread and some comments may be shown as answers.

RadWin always open on pageLoad

2 Answers 53 Views
Window
This is a migrated thread and some comments may be shown as answers.
Shaza
Top achievements
Rank 1
Shaza asked on 17 Aug 2011, 08:41 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 17 Aug 2011, 10:23 AM
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.
0
Shaza
Top achievements
Rank 1
answered on 17 Aug 2011, 10:31 AM
Thanks a lot .. EnableViewState = "false" worked perfect ! :)
Tags
Window
Asked by
Shaza
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Shaza
Top achievements
Rank 1
Share this question
or