help stretching the rotator horizontaly

17 posts, 0 answers
  1. Marc
    Marc avatar
    21 posts
    Member since:
    Nov 2008

    Posted 02 Nov 2008 Link to this post

    I am starting to use the rotator control. But cant seem to make it stretch horizontaly when the user resizes the browser horizontaly.

    I have the rotator width="100%" but when I grab the side of the browser to make it wider or narrower, normaly all my div's resize and stretch but now with the rotator it seem that the rotator does not resize at all with them.

    is there a work around?
  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 05 Nov 2008 Link to this post

    Hello Marc,


    RadRotator does not support sizes in percents. The algorithm that calculates the position and moving of the items depends on exact values for the size of the control that are set in the initialization phase.

    To be able to work with percents, browsers must suppot onresize event for HTML elements. Unfortunately so far only IE has such support - all other browsers have onresize event for the window object only. That is why at this point it is not possible to provide a reliable mechanism for sizing the control in percents. Of course if we find a suitable solution in the future, we will implement it right away.



    Sincerely yours,
    Georgi Tunev
    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. Marc
    Marc avatar
    21 posts
    Member since:
    Nov 2008

    Posted 18 Nov 2008 Link to this post

    Thank you Geogi.

    but, and dont forget that I am not an expert, I also tried puting the rotator inside a <div> with the overfolw:hidden and it even does not allow my div to riseze.
    Is this normal? is there a way to do what I want to do?

    <

     

    asp:Panel SkinID="MainPhotoStrip" style="width:100%; overflow:hidden;" ID="Panel1" runat="server">

     

     

    <telerik:radrotator ID="RadRotator1" runat="server"

     

     

    DataSourceID="ObjectDataSource1" FrameDuration="0"

     

     

    ItemWidth="30" Height="40" width="100%">

     

     

    <ItemTemplate>

     

     

    <table border="0" cellpadding="0" cellspacing="0" class="photo-frame">

     

     

    <tr>

     

     

    <td class="topx--"></td>

     

     

    <td class="top-x-"></td>

     

     

    <td class="top--x"></td>

     

     

    </tr>

     

     

    <tr>

     

     

    <td class="midx--"></td>

     

     

    <td>

     

     

    <asp:Image ID="Image1" runat="server" SkinID="PhotoStripImage" ImageUrl='<%# "~/" + Eval("imageurl")%>' />

     

     

    <td class="mid--x"></td>

     

     

    </tr>

     

     

    <tr>

     

     

    <td class="botx--"></td>

     

     

    <td class="bot-x-"></td>

     

     

    <td class="bot--x"></td>

     

     

    </tr>

     

     

    </table>

     

     

    </ItemTemplate>

     

     

     

    </telerik:RadRotator>

     

  5. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 21 Nov 2008 Link to this post

    Hi Marc,

    As my colleague said, the problem is related to the rotator itself - we need to know its size in pixels in order to calculate the number of items to display. If the rotator is resized, we need to make those calculations again. At the moment, we cannot detect that, so the rotator will not resize when you change the window size. Whatever dimensions the rotator has when the page is loaded will remain until you reload the control or you call the set_height() or set_width() methods from the rotator client API.

    Sincerely yours,
    Lini
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. RobDob
    RobDob avatar
    14 posts
    Member since:
    Sep 2004

    Posted 17 Feb 2009 Link to this post

    Hello,

    Is it NOT possible to have the rotator resize in relation to the size of the browser window.  I see that a simlar question was asked and addressed at the following link http://www.telerik.com/community/forums/aspnet/rotator/how-to-auto-resize-rad-rotator.aspx making me think that it was/is possible. 

    Can you please let me know if getting the roatator to resize in relation to the browser window is posssible?

    Thanks,
  7. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 20 Feb 2009 Link to this post

    Hi RobDob,

    The link that you posted is related to the old version of RadRotator. Currently RadRotator for ASP.NET AJAX can be resized in the desired manner only by using the approach that Lini described above.
    Of course if we create such inbuilt functionality that produces a consistent result in all major browsers, we will add this information in the release notes.

    Sincerely yours,
    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. RobDob
    RobDob avatar
    14 posts
    Member since:
    Sep 2004

    Posted 20 Feb 2009 Link to this post

    Hi,

    Is it possible to get the old version of the rotator to woek in conjuction with the RadToolTip?  I really need to be able to get the control to resize with the window.. 

    Thanks,
  9. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 23 Feb 2009 Link to this post

    Hi Rob,

    I suggest you to use the newest version of the RadControls. The RadRotator for ASP.NET control does not have methods for resizing the control and it is not developed anymore. In RadRotator for ASP.NET AJAX your scenario will be possible.


    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.
  10. RobDob
    RobDob avatar
    14 posts
    Member since:
    Sep 2004

    Posted 23 Feb 2009 Link to this post

    Hi,

    >>"In RadRotator for ASP.NET AJAX your scenario will be possible."

    Terrific please show me how with an example if possible, as I really need to be able to have the control resize with the window,  I don't need the amount of frames to increase just the space between them..

    Thanks,
  11. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 24 Feb 2009 Link to this post

    Hello RobDob,

    By design the RadRotator for ASP.NET AJAX has methods which allows the user to set the size( set_width(), set_height()) of the control. I suggest you however to use this methods in the OnClientLoad() event handler only, when the element initially load. Note that the algorithm that calculates the position and moving of the items depends on exact values for the size of the control that are set in the initialization phase. If  RadRotator is resized after it was loaded, this will affect its functionality.

    For your convenience I attached a simple project which demonstrates how can resize the RadRotator control in onresize event handler of the window object.

    Sincerely yours,
    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.
  12. RobDob
    RobDob avatar
    14 posts
    Member since:
    Sep 2004

    Posted 27 Feb 2009 Link to this post

    Hello,

    Thank you for your example however it doesn't really work,  using the old version of your RadRotator at least what I'm trying to do is possible although it doesn't work to smoothly it still works,  the attached example does not work and does not accomplish what I'm trying to accomplish.  Why is it that you drop important features like this moving forward?

    Thanks,
  13. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 04 Mar 2009 Link to this post

    Hi Rob,

    Although they look similar, RadRotator for ASP.NET AJAX has very little in common with RadRotator for ASP.NET. The new control is basically rewritten from scratch and to be able to support its current features and others that would be implemented in the future, its size must be calculated in pixels.
    So far we haven't received other request for resizing the control on the client and this is the main reason why such feature was not logged for implementation. Now I logged it in our database and we will consider it for a future release.

    For the time being, I would suggest to try the attached solution that shows how to implement a similar functionality by using jQuery and RadRotator - I hope that it will be of help.


    Sincerely yours,
    Georgi Tunev
    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.
  14. RobDob
    RobDob avatar
    14 posts
    Member since:
    Sep 2004

    Posted 04 Mar 2009 Link to this post

    Hello,

    thakn you for your example, however your example does NOT work correctly within the latest version of IE.  would it be possible to obtain an example that does.

    Thanks,
  15. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 06 Mar 2009 Link to this post

    Hello RobDob,

    If by latest IE you are referring to IE8 Beta, please note that we do not support browsers in Beta stage.
    As for the project itself, the attached example use jQuery for controlling the size of the items and yes, it is not perfect, but it is the only one that we could suggest for now. As I previously said, this functionality is not supported in RadRotator out of the box and if you want you can implement a custom logic based on this one in the jQuery example.
    I assure you that once we officially include this feature in our control, it will work as expected in all major browsers.


    All the best,
    Georgi Tunev
    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.
  16. RobDob
    RobDob avatar
    14 posts
    Member since:
    Sep 2004

    Posted 09 Mar 2009 Link to this post

    Hi,

    I'm using IE 7.0 and it doesn't seem to work..
    Thanks
  17. David C
    David C avatar
    1 posts
    Member since:
    Mar 2010

    Posted 14 Mar 2013 Link to this post

    It would be really great if you could have an ad roator that auto resizes or at least explain how to do so with css.  Here is an example of an ad rotator that resizes.  This is very important because many users are viewing on cell phone.

    For an example, click the below link and then resize the window.
    http://urbanairship.com/
  18. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 18 Mar 2013 Link to this post

    Hello David,

    RadRotator is designed to work only with fixed size. If its size or the size of its items is changed on the client, the calculations that are performed when sliding the items will not be correct, which will affect the proper functionality of the control.

    If you need to change the width/height of the rotator dynamically, you will have to initiate an AJAX request to the server in order to apply the new size to the control. This Knowledge Base article includes an example of the described approach, which could be useful in you case.

    All the best,
    Slav
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017