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

Radwindow and Lightbox

4 Answers 149 Views
Window
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 17 Sep 2009, 01:33 PM
Hi,
One of our internal sites lists a load of jobs. When you click on a job, all the details are displayed in a rad window, with one of the pieces of information being numerous thumbnails. When we click on a thumbnail it displays the fullsize picture in lightbox. The problem is this is displayed within the radwindow and not across the whole browser width. Is there a way to stop the radwindow limiting the size of the lightbox?
Thanks.

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Sep 2009, 10:56 AM
Hi Tom,

I guess you want to resize the RadWindow according to the content. Have you tried setting AutoSize property to True?

You can also set the width and height of RadWindow dynamically using the client side methods set_width() and set_height() respectively. Checkout the code library: Smart Resizing of RadWindow controls

-Shinu.
0
Svetlina Anati
Telerik team
answered on 22 Sep 2009, 12:45 PM
Hello Tom,

As far as I understand your requirements you want the RadWindow to resize according to its content as Shinu also suggests. If so, please either set AutoSize="true" or call it thorugh code with or wiothout a parameter to turn on/off the animation. You can find a very similar online demo below:

http://demos.telerik.com/aspnet-ajax/window/examples/autosize/defaultcs.aspx

Another option is to simply set explicit width/height through the Width and Height properties (thir default values are 300px) - this is the better solution if the images are with the same size because executing scripts influences teh performance and if you do not need this it is better to simply specify the size.

If this is not what you want, please provide a more detailed explanations and I will do my best to help.

Sincerely yours,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tom
Top achievements
Rank 1
answered on 22 Sep 2009, 04:07 PM
Hi.
Thanks for the replies, but the result is not exactly what I want. I need the lightbox to be able to go full screen but radwindow to stay as is (smaller than full screen) (i.e. not to have its dimensions limited by the radwindow).
If this is not possible, is it possible to feed a parameter from the radwindow (i.e. image I click on) without closing it down etc to fire the lightbox script from the main window and have that go over the radwindow?
Thanks.
0
Georgi Tunev
Telerik team
answered on 23 Sep 2009, 12:16 PM
Hello Tom,

Thank you for the additional details - now we understand your scenario better. The reason for this behavior is that the RadWindow control is basically an IFRAME that displays a content page different from the parent one. If the lightbox is in this content page, it is not possible to show it outside of the IFRAME's borders, so the only solution is to have the lightbox in the main page (the one from which the RadWindow is called) and call it from there.
You could do that by either using GetRadWindow().BrowserWindow.FnName() where FnName() is the name of the JavaScript function on the parent page that will open the lightbox or alternatively - by using top.FnName().

Best wishes,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Tom
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Svetlina Anati
Telerik team
Tom
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or