The question is in the title :
I have a System.Web.UI.Page
contained in a Telerik.Web.UI.RadWindow
and I can't find out a way to access the RadWindow
from the Page
code-behind.
I tried to explore the Page
properties, and I guess that there's a casting to do on a control at some point, but I didn't find anything.
EDIT : At runtime, I have no clue on where the RadWindow comes from (it is generated dynamically from about anywhere in the application), so I can't access it to modifiy the RadWindow definition. That's why I need to access it at runtime, to alter it programmatically.
Can you help me ?
Thanks !
You can't access the RadWindow in the code-behind of the content page. That would be equivalent to accessing Default.aspx from SomeOtherPage.aspx in the code-behind. There simply isn't a way to do that.
You can, however, use JavaScript. If the pages are all yours (i.e. same application, same domain) you can get a reference to the RadWindow and use its Client-side API. See here:
http://www.telerik.com/help/aspnet-ajax/window-programming-radwindow-methods.html
and
http://www.telerik.com/help/aspnet-ajax/window-programming-calling-functions.html - the GetRadWindow() will return the reference
and here
http://www.telerik.com/help/aspnet-ajax/window-application-is-page-in-radwindow.html