CoverFlow "Main" Item Content Change

3 posts, 0 answers
  1. Turok
    Turok avatar
    1 posts
    Member since:
    Mar 2011

    Posted 25 Mar 2011 Link to this post

    Hi, is there a way to change the item "main" (the one in the middle, don't know how to call it) content?

    I have soccer teams pictures in the coverflow, but when an image goes to the middle, I want to change its content.

    Probably OnClientItemShown event should be used, right? But I want to show some data from DB, so is there a way how to do this on server side so I can code it in C#?

    Thank you
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Mar 2011 Link to this post

    Hello Turok,

    Probably, you can invoke an ajaxRequest() to execute your server code to change the image for Rotator item.

    Attach the "OnClientItemShown"  client event as you thought. Now from the client side event handler, call the ajaxRequest(). Now in the "RadAjaxManager_AjaxRequest()" event, get reference to the corresponding rotator item and perform the necessary change. You will have to pass the index of RadRotator item to server side (when invoking the ajaxRequest() ) to identlfy the corresponding item.

    I hope the suggestion help you.

  3. DevCraft R3 2016 release webinar banner
  4. Niko
    Niko avatar
    383 posts

    Posted 29 Mar 2011 Link to this post

    Hello Turok,

    There is one more option that you can go with. In the ItemTemplate add a hidden <div> element with a css class of extraData, for example. In the OnClientItemShown event you can try showing this extra element, keeping in mind that you will need to hide the extra element of the item that is being replaced as current. Here is an example how this may be implemented:
    function RotatorClientItemShown(sender, args)
        var item = args.get_item();

    Hope this will be of help to you as well.

    Best wishes,
    the Telerik team
Back to Top