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

How to refresh rad rotator

3 Answers 73 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Nagabooshanam
Top achievements
Rank 1
Nagabooshanam asked on 25 Sep 2012, 03:12 AM
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.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Sep 2012, 05:54 AM
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.
0
Prava kafle
Top achievements
Rank 1
answered on 16 Nov 2012, 05:29 PM
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
0
Slav
Telerik team
answered on 20 Nov 2012, 04:46 PM
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.
Tags
Rotator
Asked by
Nagabooshanam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Prava kafle
Top achievements
Rank 1
Slav
Telerik team
Share this question
or