Rotator size

8 posts, 0 answers
  1. Jørgen
    Jørgen avatar
    16 posts
    Member since:
    Jan 2009

    Posted 04 Dec 2008 Link to this post

    Hi,

    Is there any way to let the rotator size itself according to its contents (images in particular)? I populate the rotator with asp:Images, but if (item)height/(item)width are not specified it just defaults to 200x200 pixels regardless of the image size.

    Regards,
    Sjur
  2. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 08 Dec 2008 Link to this post

    Hello Sjur,

    Currently it is not possible to dynamically resize the RadRotator control according to its content because it will not be able to automatically calculate the number of items to show at once and how long the scroll should be. In order to get a better appearance you should set the same size for the height and the width of all the items.

    All the best,
    Fiko
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philip Vaartstra
    Philip Vaartstra avatar
    2 posts
    Member since:
    Jul 2009

    Posted 10 Jul 2009 Link to this post

    It seems to me that for a vertical rotator, the width does not matter, and for a horizontal rotator, the height should not matter with respect to calculating the number of items.

    Therefore, when the rotator is configured for horizontal rotating, it should not attempt to set the height if a value has not been specified.

    I have set the height to ' ' (space character) in order to avoid the default height.  But I am having problems where Internet Explorer periodically sets an incorrect initial height for the radcontrol's container div when the page initially renders.  Then the Radcontrol's scripts come along and set that height in stone, and the divs/tables/etc. no longer size dynamically according to the contents.

    I am using RadRotator.Net2 version 2.6.1.  Has this behavior been fixed in subsequent versions?

  5. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 14 Jul 2009 Link to this post

    Hi Philip,

    The RadRotator control needs to know the Items' size (width and height), when it is loaded, in order to determine where an item starts or ends. In the RadRotator's declaration I suggest you specify appropriate values to the Width and Height (in pixels) properties according to the items' size. Those properties are important and you need them in order to make the RadRotator control works properly.
    In case that the suggested solution did not work, please open a new support ticket and send us your project. We will check it and do our best to provide a solution.

    Regards,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Philip Vaartstra
    Philip Vaartstra avatar
    2 posts
    Member since:
    Jul 2009

    Posted 14 Jul 2009 Link to this post

    I think you missed the point of my previous post.  For a horizontal scroller, it should not matter what the height is.  The number of items displayed is based solely on width.

    Please explain why the height would have to be specified for a horizontal scroller.
  7. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 17 Jul 2009 Link to this post

    Hello Philip,

    Yes you are right - in a horizontal mode the Width and ItemHeight properties are used in order to determine where an item starts or ends. Please note that, however, when you did not specify the Height and ItemHeight properties, then there are potential size issues with inline elements, that are placed inside the Rotator's ItemTemplate. Once again, I recommend you set all of the dimension properties of the RadRotator control in order to avoid any undesired behavior.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Nico
    Nico avatar
    3 posts
    Member since:
    Apr 2008

    Posted 27 Jul 2009 Link to this post

    Is this problem solved??

    i can whit the current telerik version (Q2 2009) solve this problem and dinamically resize the picture?

    Thanks
  9. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 29 Jul 2009 Link to this post

    Hello Nico,

    The RadRotator control does not support percentage resize of the content that is inside the ItemTemplate. The control works with fixed size of the items and does not support values in percent set to the Width, ItemWidth, Height, ItemHeight properties.

    I hope this helps.

    All the best,
    Fiko
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017