Hi, all.
I have a RadWindowManager sitting in my default.aspx page ("wndMgrDefault"). I'm trying to add a RadWindow to it from Javascript via a WebMethod (using the OnClientClicked property of a RadButton that's also on the same page), but I can't seen to find the wndMgrDefault control when I'm inside the method itself.
Javascript:
VB:
For some reason, the mgr variable is coming back as Nothing. If I make the routine a normal server-side method, I can add the window using "wndMgrDefault.Windows.Add(wndRatings)" with no problem, but I didn't want to re-render the entire page every time someone clicks this button. Is there anything I'm missing by trying to add a RadWindow to the window manager doing it this way?
I have a RadWindowManager sitting in my default.aspx page ("wndMgrDefault"). I'm trying to add a RadWindow to it from Javascript via a WebMethod (using the OnClientClicked property of a RadButton that's also on the same page), but I can't seen to find the wndMgrDefault control when I'm inside the method itself.
Javascript:
function
ViewRating(sender, args) {
PageMethods.set_path(
'default.aspx'
);
PageMethods.OpenRating();
}
VB:
<System.Web.Services.WebMethod()> _
Public
Shared
Sub
OpenRating()
Dim
currPg
As
Page =
DirectCast
(HttpContext.Current.Handler, Page)
Dim
mgr
As
RadWindowManager =
DirectCast
(currPg.FindControl(
"wndMgrDefault"
), RadWindowManager)
Dim
wndRatings
As
New
RadWindow
Dim
ht
As
Integer
=
CInt
(HttpContext.Current.Session(
"WND_HT"
).ToString)
Dim
wd
As
Integer
=
CInt
(HttpContext.Current.Session(
"WND_WD"
).ToString)
With
wndRatings
...
End
With
mgr.Windows.Add(wndRatings)
End
Sub
For some reason, the mgr variable is coming back as Nothing. If I make the routine a normal server-side method, I can add the window using "wndMgrDefault.Windows.Add(wndRatings)" with no problem, but I didn't want to re-render the entire page every time someone clicks this button. Is there anything I'm missing by trying to add a RadWindow to the window manager doing it this way?