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

Fundamentals required for RadWindow

2 Answers 121 Views
Window
This is a migrated thread and some comments may be shown as answers.
EmpowerIT
Top achievements
Rank 2
EmpowerIT asked on 21 Nov 2007, 11:18 PM
I want to know what the basic controls that are required to have a RadWindow function as follows.

I have a button on the page that is clicked, which needs to call a method on this server. Depending on the result this method will then try to populate a label with some javascript to show the radwindow. After fiddling around with it, i either get the case where the label has its text property set but it does not appear in the page source after the post back, OR it does appear but i get a javascript error along the lines of "_1c has no proeprties" from this chunk of code( from firebug):
window.radopen=function(url,_1b){ 
var _1c=GetRadWindowManager(); 
return _1c.open(url,_1b); 
}; 


What are the basic requirements? I've got this working on some pages, but not on others, and I cant seem to figure out what im doing wrong. If you could point out what is required (e.g RadWindowManager, RadAjaxManager, ScriptManager, Label, asp:UpdatePanel, Button.AutoPostback set etc) so I can try rectify it
I'm new to this ajax thing and i cant seem to make it work consistently for me

Thanks

2 Answers, 1 is accepted

Sort by
0
EmpowerIT
Top achievements
Rank 2
answered on 22 Nov 2007, 01:42 AM
I've been hacking at this all morning, and I've narrowed it down to this:

On the pages that work, the following piece of code returns a valid value. On the pages that are broken it returns null.

function GetRadWindowManager(){ 
return Telerik.Web.UI.WindowManager.Manager; 
This is Telerik code. On a page that works, it would say something like Div RadWindowManager1
The other pages return null, even though the window definition is the same (as shown below)
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" Behaviors="Move,Close" VisibleStatusbar="false" ReloadOnShow="true" Width="400px" Height="500px"
 <Windows>  
    <telerik:RadWindow ID="StandardWindow" runat="server"></telerik:RadWindow> 
 </Windows> 
</telerik:RadWindowManager> 
What am I missing that could be causing the telerik code to return null?
Any help would be appreciated
0
Tervel
Telerik team
answered on 23 Nov 2007, 02:48 PM
Hello link64,

The only scenario I can think of when such behavior might occur is that you actually call window.radopen prior to the page onload event. You should always call it after the page has loaded.

Since RadWindowManager, as all other Prometheus controls, is built upon MS AJAX it is created by the MS AJAX framework in the page load event (strictly speaking, in the Sys.Application.load MS AJAX event).

You can easily see this by hitting "View Page Source" in the browser and scrolling to the bottom of the page, where all MS AJAX controls are being created.

If this is not the case, and your problem is not resolved, please send us a simple project that demonstrates the issue and we will examine the problem for you.


Regards,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
EmpowerIT
Top achievements
Rank 2
Answers by
EmpowerIT
Top achievements
Rank 2
Tervel
Telerik team
Share this question
or