6 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 23 Apr 2013, 09:06 AM
Hi,
You can use getWindowByName method to check which window is opened. Check the following help documentation which expalins more about this.
RadWindowManager API
Thanks,
Shinu
You can use getWindowByName method to check which window is opened. Check the following help documentation which expalins more about this.
RadWindowManager API
Thanks,
Shinu
0
Mihai
Top achievements
Rank 1
answered on 23 Apr 2013, 10:14 AM
Thanks Shinu,
I was actually looking for a way to check if any RadWindow is opened from codebehind.
Any ideas?
I was actually looking for a way to check if any RadWindow is opened from codebehind.
Any ideas?
0
Shinu
Top achievements
Rank 2
answered on 24 Apr 2013, 04:30 AM
Hi,
You can check using the following condition.
c#:
Thanks,
Shinu
You can check using the following condition.
c#:
if
(RadWindow1.VisibleOnPageLoad ==
true
)
{
}
Thanks,
Shinu
0
Mihai
Top achievements
Rank 1
answered on 24 Apr 2013, 06:47 AM
Hello Shinu,
I tried your solution but, as imagined, it doesn't work because I'm opening the RadWindow client-side(using JS) and VisibleOnPageLoad is a server property.
A few days ago I saw the syntax RadWindowManager.Current.GetWindows() but couldn't get it to work with asp.net.
Any other ideas?
I tried your solution but, as imagined, it doesn't work because I'm opening the RadWindow client-side(using JS) and VisibleOnPageLoad is a server property.
A few days ago I saw the syntax RadWindowManager.Current.GetWindows() but couldn't get it to work with asp.net.
Any other ideas?
0
Accepted
Hi guys,
If all RadWindows on the page are opened through a RadWindowManager you can use the GetRadWindowManager().getActiveWindow() method to see if there is an active window (i.e. a shown one).
You can try it out with the following simple code:
When it alerts null then there is no RadWindow opened. Comment out some of the close() calls and you will get the RadWindow object.
Note that this is a client-side method and such a check cannot be performed on the server. It can be done before a request is initiated and a flag in a hidden field can be raised to transfer the information to the code-behind.
Regards,
Marin Bratanov
the Telerik team
If all RadWindows on the page are opened through a RadWindowManager you can use the GetRadWindowManager().getActiveWindow() method to see if there is an active window (i.e. a shown one).
You can try it out with the following simple code:
<telerik:RadWindowManager ID=
"RadWindowManager1"
runat=
"server"
>
</telerik:RadWindowManager>
<script type=
"text/javascript"
>
function
pageLoad()
{
var
one = radopen();
var
two = radopen();
var
three = radopen();
alert(GetRadWindowManager().getActiveWindow());
one.close();
two.close();
three.close();
alert(GetRadWindowManager().getActiveWindow());
}
</script>
When it alerts null then there is no RadWindow opened. Comment out some of the close() calls and you will get the RadWindow object.
Note that this is a client-side method and such a check cannot be performed on the server. It can be done before a request is initiated and a flag in a hidden field can be raised to transfer the information to the code-behind.
Regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Mihai
Top achievements
Rank 1
answered on 24 Apr 2013, 07:29 PM
Thank you!