Rotator to display one big string, with characters added from right of string and deleted from left of screen

2 posts, 0 answers
  1. Prava kafle
    Prava kafle avatar
    203 posts
    Member since:
    Apr 2010

    Posted 27 Dec 2012 Link to this post


    I have one bring string and I would like my text to move  one word at a time to  the left of screen and load new character on right of screen at the same time.  Can you provide some sample code for this?

  2. Slav
    Slav avatar
    1351 posts

    Posted 02 Jan 2013 Link to this post

    Hi Prava,

    If I understand you correctly, you want to split a particular string on portions and use them to populate a RadRotator. Note that the size of all rotator items should be the same, so you will need to split your text equally. After this is done, you should be able to data-bind the rotator similarly to the following sample:
    <telerik:RadRotator runat="server" ID="WordsRotator" Width="450px" Height="30px"
        ItemHeight="30px" ItemWidth="150px">
            <%# Container.DataItem %>

    protected void Page_Load(object sender, EventArgs e)
        if (!IsPostBack)
            WordsRotator.DataSource = new string[] { "This is a sample text 1", "This is a sample text 2", "This is a sample text 3", "This is a sample text 4" };

    I hope this helps. Feel free to contact us again if you encounter more difficulties.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top