RadWindow / RadRotator / RadImage with AutoSize

2 posts, 0 answers
  1. Vavřík
    Vavřík avatar
    1 posts
    Member since:
    Jun 2009

    Posted 23 Feb 2012 Link to this post


    I have RadWindow containing only RadRotator with RadBinaryImage connected to underlaying database with images. My goal is to create an image gallery browser with RadWindow / RadRotator "autosize" behavior. That means RadWindow and RadRotator should have changed its width / height according to image pulled from database whenever active / shown image is changed. How can I achieve that...? I suppose to handle "autosize" behavior in OnClientShowing event but I do not know how... :-/

    Thanks a lot for any advice.

  2. Richard
    Richard avatar
    479 posts
    Member since:
    Nov 2011

    Posted 27 Feb 2012 Link to this post


    In researching this, it appears that RadRotator does not directly implement a resize method within its client-side API.

    You can use the RadWindow Client-Side API "set_height" and "set_width" in pixels to an appropriate size for each new image.

    Then you can use the window.onresize event to explicitly set the "style.width" and "style.height" properties of the RadRotator element based on the dimensions of each new image pulled from the database.

    You can reference the RadRotator resizing issue forum thread for insights on doing this. And, also refer to the help stretching the rotator horizontaly for a better understanding of resizing the RadRotator.

    Hope this helps you.
Back to Top