How to rotate user controls

10 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 07 Apr 2006 Link to this post

     

    Requirements

    r.a.d.rotator version

    2.1.2

    .NET version

    2.0

    Visual Studio version

    2005

    programming language

    VB

    browser support

    all browsers supported by r.a.d.rotator



    This project shows two things:

    1. How to create a r.a.d.rotator entirely from code-behind
    2. How to rotate user controls
     
  2. Mark Chipman
    Mark Chipman avatar
    219 posts
    Member since:
    Nov 2004

    Posted 12 Apr 2006 Link to this post

    It sure would be nice to have a C# example of doing this!

    -Mark Chipman
  3. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 14 Apr 2006 Link to this post


    Hello Mark,

    Thank you for creating a C# example on how to rotate user controls. We have attached your project here for the common good.

    All the best,
    Peter
    the telerik team
  4. Mark Chipman
    Mark Chipman avatar
    219 posts
    Member since:
    Nov 2004

    Posted 14 Apr 2006 Link to this post

    No problem Peter....

    One thing that I would recommend in making the download available in the zip format rather than the rar format.

    Also note, the code that I submitted had the additional onclick event handler attached, however for anyone using my example, they should eliminate that handler reference since I could not figure out how to get the event to fire... hence that code is not required at all.

    Thanks,

    Mark
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 17 Apr 2006 Link to this post

    Hello Mark,

    Thank you for the feedback - your point is taken. I must have missed that the project is in rar.

    The main idea behind the code library is to allow the telerik community to share interesting projects and help each other. We would like to see people who are using telerik components take the initiative with the code library - upload projects and reply to threads. And I think you have picked up pretty well on the idea. Good job!


    All the best,
    Peter
    the telerik team
  6. user user
    user user avatar
    1 posts
    Member since:
    Nov 2009

    Posted 18 Nov 2009 Link to this post

    I am not sur eif this thread is still active ..
    I used a usercontrol instead of a 'DynamicRotator' page to load the rotator control . However it throws a javascript error. 
    Apparently the  Loadtemplate() function  works only with a page and not a usercontrol. Any suggestions are appreciated.

    Thanks
  7. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 20 Nov 2009 Link to this post

    Hello Mark,

    I was able to reproduce the problem. In your case, however, you can easily solve the error by calling the DataBind method after the RadRotator control is added to the controls collection of PlaceHolder1.
    For your convenience I have attached the modified project to the thread.

    I hope this helps.

    Sincerely yours,
    Fiko

    the telerik team
  8. Kirk
    Kirk avatar
    2 posts
    Member since:
    Jun 2012

    Posted 19 Jun 2012 Link to this post

    Hello,

    I'm playing with your project.
    just instead of r.a.d. I'm using standard Telerik's Web.UI Lib

    It works, it creates rotator user control and panels with customized content details, but it doesn't work when rotation is controlled FromCode.
    Please, see the project.
    on the main page dynamic_rotator.aspx you'd find two rotators: 1) as UserControl 2) normal RadRotator

    The last one works...

    the First has the problem I've described above.

    The idea is to build a questionary panels... I've done it with jQuery, but want to understand if the same could be implemented with RadRotator.

    Please, take your time and look into the attached project.
    Need the FromCode option to be Enabled.
  9. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 21 Jun 2012 Link to this post

    Hello Kirk,

    The RadRotator is not working because it is not referenced in the clients-side script that is executed when the Left or the Right link is clicked. Since the rotator control is created on the server-side, the onclick handlers of the links should be registered on the server as well so that the RadRotator can be successfully referenced.
    Also, I would suggest moving the links through which the RadRotator is scrolled in the user control that contains it as they are related in the custom scrolling implementation.

    I have attached a modified version of the RadRotator user control to demonstrate the suggested solution. Please check it and change your actual project accordingly to resolve your problem.

    Regards,
    Slav
    the Telerik team

    Consider using RadControls for ASP.NET AJAX (built on top of the ASP.NET AJAX framework) as a replacement for the Telerik ASP.NET Classic controls, See the product support lifecycle here.

  10. Kirk
    Kirk avatar
    2 posts
    Member since:
    Jun 2012

    Posted 21 Jun 2012 Link to this post

    Thank you, Slav, it works!
    Gonna buy Telerik Full Pack this or nex week.
Back to Top