Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > General Discussions > How to stop reloading of radrotator on every item click?

Not answered How to stop reloading of radrotator on every item click?

Feed from this thread
  • Pawan avatar

    Posted on Feb 8, 2012 (permalink)

    Hello,

    I am using radrotator having xml datasource to load thumb images in ratator also rotator is having scroll using javascript which rotates thumb images horizontally when I click on scroll button and then click on image in rotator its original image get visible on top of this rotator but the problem is thumb rotator starts again from first image. Even I used the rad ajax panel for this but the problem is same.

    Can someone help me how to stop this reloading of radrotator it should show the clicked image.

    Reply

  • Slav Slav admin's avatar

    Posted on Feb 10, 2012 (permalink)

    Hello Pawan,

    There are two options for achieving this:
    • You can use one of the client-side evens OnClientItemClicked and OnClientItemClicking and set the RadRotator property AutoPostBack to false in order to execute your logic on the client. The clicked item will be persisted as there will not be a postback.
    • You can continue to postback the page on item click, in which case the clicked item can be persisted by handling the server-side event of RadRotator OnItemClick, as shown in the code sample below:
      protected void RadRotator1_ItemClick(object sender, RadRotatorEventArgs e)
      {
          RadRotator rotator = sender as RadRotator;
          rotator.InitialItemIndex = e.Item.Index;// Persist the index
      }

    I hope this helps.

    Regards,
    Slav
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > General Discussions > How to stop reloading of radrotator on every item click?