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

Launching the RadWindow

2 Answers 73 Views
Window
This is a migrated thread and some comments may be shown as answers.
Geetha
Top achievements
Rank 1
Geetha asked on 30 Aug 2012, 01:32 PM

Hello,

           I am using the rad window  for the first time. Here is the code, how I have declared rad window.

<telerik:RadWindowManager ID="RadWindowMyImage" runat="server" EnableShadow="true">
<Windows>

<telerik:RadWindow ID="RadWindow1" runat="server" Modal="true">
<ContentTemplate>
<placeholder id="iframe1" runat="server" width="400px" height="400px">
</placeholder>
</ContentTemplate>
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
 

and I am loading an image and launching the window like this.
 

PlaceHolder mybox = RadWindow1.ContentContainer.FindControl("iframe1") as PlaceHolder;
System.Web.UI.WebControls.
Image appImage = new System.Web.UI.WebControls.Image();
string base64String = Convert.ToBase64String(myimage, 0, myimage.Length); //myimage is byte array
appImage.ImageUrl = "data:image/png;base64," + base64String;
appImage.Width = Unit.Pixel(100);
appImage.Height = Unit.Pixel(100);
iframe1.Controls.Add(appImage);
RadWindow1.Visible = true;

Am I doing correctly?? My rad window is not getting poped up when I click the button. Can any one help me out in this? Where I am doing wrong?

Thanks in Advance.

Thanks,
Geetha Rani.

 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Aug 2012, 06:42 AM
Hi,

Try setting VisibleOnPageLoad as true.
C#:
RadWindow1.VisibleOnPageLoad = true;

Thanks,
Princy.
0
Marin Bratanov
Telerik team
answered on 03 Sep 2012, 08:30 AM
Hi guys,

I would advise that you use the approach from the following sticky thread to open a RadWindow from the server: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx. Just setting VisibleOnPageLoad to true with the intention to show the RadWindow only once will not suffice.


Greetings,
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.
Tags
Window
Asked by
Geetha
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Marin Bratanov
Telerik team
Share this question
or