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

Render Window via CodeBehind

3 Answers 67 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chase Florell
Top achievements
Rank 1
Chase Florell asked on 08 Sep 2008, 08:25 PM
Ok so I am completely new to this concept so I am looking for a "For Dummies" approach to accomplishing my task.

Basically I want to render a RadWindow at runtime for the simple fact that I do NOT want to have the code in my ASPX file... for cleanliness reasons.

    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
 
        'Create RadWindow Instance  
        Dim RadWindow1 As New RadWindow  
        RadWindow1.ID = "RadWindow1" 
        RadWindow1.Skin = "Vista" 
        RadWindow1.Modal = "true" 
        RadWindow1.VisibleStatusbar = "false" 
        RadWindow1.VisibleTitlebar = "true" 
        RadWindow1.Behaviors = WindowBehaviors.Close ' & WindowBehaviors.Move  
        RadWindow1.OpenerElementID = "Button1" 
        RadWindow1.NavigateUrl = "~/App_Windows/ADMIN.aspx" 
        RadWindow1.Width = "800" 
        RadWindow1.Height = "650" 
        RadWindow1.KeepInScreenBounds = "true" 
        RadWindow1.EnableAjaxSkinRendering = "true" 
        Me.Controls.Add(RadWindow1)
 
    End Sub 

Where have I gone wrong?

3 Answers, 1 is accepted

Sort by
0
Chase Florell
Top achievements
Rank 1
answered on 08 Sep 2008, 11:38 PM
This is all the "View Source" output I receive from running the page.
 
<div id="RadWindow1" style="display:none;">  
    <input id="RadWindow1_ClientState" name="RadWindow1_ClientState" type="hidden" /> 
</div> 
0
Chase Florell
Top achievements
Rank 1
answered on 09 Sep 2008, 12:37 AM
ANSWER

Found a great solution at http://www.telerik.com/support/kb/article/b454K-gtb-b454T-cec.aspx

instead of using
me.controls.add(RadWindow1)
I used
form1.controls.add(RadWindow1)

I don't know enough about .NET to know the difference, but I do know it worked.
0
Georgi Tunev
Telerik team
answered on 09 Sep 2008, 05:25 AM
Hello Chase,

Indeed, you need to add the controls that you create to the <form> in order for them to work properly. Same holds true for any RadControl.



Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Chase Florell
Top achievements
Rank 1
Answers by
Chase Florell
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or