Radwindow and Lightbox

5 posts, 0 answers
  1. Tom
    Tom avatar
    7 posts
    Member since:
    Feb 2009

    Posted 17 Sep 2009 Link to this post

    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.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Sep 2009 Link to this post

    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.
  3. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 22 Sep 2009 Link to this post

    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.
  4. Tom
    Tom avatar
    7 posts
    Member since:
    Feb 2009

    Posted 22 Sep 2009 Link to this post

    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.
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 23 Sep 2009 Link to this post

    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.
Back to Top