This is a migrated thread and some comments may be shown as answers.
Closed RadWindows reappear on postback
4 Answers 59 Views
This is a migrated thread and some comments may be shown as answers.
Per Granaune
Top achievements
Rank 1
Per Granaune asked on 21 Sep 2010, 02:58 PM
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?

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 22 Sep 2010, 06:25 AM
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
0
Per Granaune
Top achievements
Rank 1
answered on 22 Sep 2010, 12:57 PM
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?
0
Per Granaune
Top achievements
Rank 1
answered on 23 Sep 2010, 01:17 PM
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?
0
Georgi Tunev
Telerik team
answered on 23 Sep 2010, 03:26 PM
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
Asked by
Per Granaune
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Per Granaune
Top achievements
Rank 1
Share this question
or