This is a migrated thread and some comments may be shown as answers.

RadTicker

2 Answers 75 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Smiely
Top achievements
Rank 1
Smiely asked on 11 Apr 2011, 07:31 PM
How can make RadTicker to stop ticking ?  I have hooked it to the timer I already have which is for 15 mins. I want RadTicker to start every 15 mins and stop after 5 mins. How can I do that ?

Please help,
Smiely

2 Answers, 1 is accepted

Sort by
0
Smiely
Top achievements
Rank 1
answered on 12 Apr 2011, 09:21 PM
Anybody......
0
Niko
Telerik team
answered on 13 Apr 2011, 02:01 PM
Hi Smiely,

The best way to accomplish what you are aiming at is through the client-side API of the RadTicker combined with the JavaScript methods setTimeout and setInterval. Here is how I prepared the attached sample page:
  1. At the load handler of the Sys.Application get a reference to the ticker. Request a stop of the ticker after the required interval and initialize the ticker looping, i.e. starting after another interval:
    Sys.Application.add_load(function()
    {
        var ticker = $find("<%= theTicker.ClientID %>");
        requestStopTicker(ticker);
        initializeTickerLooping(ticker);
    });
  2. Requesting the stop could utilize the setTimeout method, executing at the end of the time interval the stopTicker ticker method:
    function requestStopTicker(ticker)
    {
        setTimeout(Function.createDelegate(ticker, ticker.stopTicker), 5000);
    }
  3. Initializing the loop of the ticker will naturally require the setinterval method. Within the interval handler the ticker should be started using the startTicker method and the request for the stop should be executed as well:
    function initializeTickerLooping(ticker)
    {
        setInterval(function() { ticker.startTicker(); requestStopTicker(ticker); }, 10000);
    }

Hope this helps.

Regards,
Niko
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Rotator
Asked by
Smiely
Top achievements
Rank 1
Answers by
Smiely
Top achievements
Rank 1
Niko
Telerik team
Share this question
or