How to refresh rad rotator

4 posts, 0 answers
  1. Nagabooshanam
    Nagabooshanam avatar
    2 posts
    Member since:
    Sep 2012

    Posted 24 Sep 2012 Link to this post

    Hi

    I want to display the latest message from database server.So is it possible to refresh the rotator every 5 minutes, without reload the page.
    Please provide the code for refresh the control.


    With Regards

    Naga.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 27 Sep 2012 Link to this post

    Hi Nagabooshanam,

    One suggestion is that you can use a timer inside the UpdatePanel to refresh the RadRotator. Following is the sample code that I tried to achieve your scenario.

    ASPX:
    <asp:UpdatePanel ID="up" runat="server">
      <ContentTemplate>
        <asp:Timer ID="Timer1" runat="server" Interval="300000" OnTick="Timer1_Tick">
        </asp:Timer>
        <telerik:RadRotator ID="RadRotator1" runat="server" Width="470px" Height="364" ItemWidth="470px" ItemHeight="230" RotatorType="Buttons" DataSourceID="SqlDataSource1">
           <ItemTemplate>
             <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Picture") %>' AutoAdjustImageControlSize="false" Width="90px" Height="110px" />
           </ItemTemplate>
        </telerik:RadRotator>
      </ContentTemplate>
    </asp:UpdatePanel>

    C#:
    protected void Timer1_Tick(object sender, EventArgs e)
      {
        RadRotator1.DataBind();
      }

    Hope this helps.

    Regards,
    Princy.
  3. Prava kafle
    Prava kafle avatar
    217 posts
    Member since:
    Apr 2010

    Posted 16 Nov 2012 Link to this post

    Hi,

    I am using RadRotaor with load on demand webservice and would like to refresh data on reaching the end of message rather than looping through the data, how can I achieve this?

    I tried to modify the function in webservice to  get latest data if item index  reached the end of record set, but once the item index reached an end it never sent any request to webservice.


    http://demos.telerik.com/aspnet-ajax/rotator/examples/loadondemand/defaultcs.aspx
    Thanks,
    Prava
  4. Slav
    Admin
    Slav avatar
    1359 posts

    Posted 20 Nov 2012 Link to this post

    Hello Prava,

    I have prepared a sample page that shows a possible approach for implementing the functionality you want to achieve. You can find it in the the other forum thread that you used for describing your case. Please examine it and let me know if it meets your requirements.

    I would suggest using a single forum thread when reporting problems in the future. This way the information on the discussed scenario will be easier to track.

    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