RadRotator.OnDataBound: EventArgs to RadRotatorEventArgs

3 posts, 1 answers
  1. Thomas
    Thomas avatar
    8 posts
    Member since:
    Dec 2010

    Posted 16 Dec 2010 Link to this post

    Dear Sir,

    I am facing the following problem:
    I want to add a custom attribute to a RadRotatorItem during databinding, but the method generated by the visual studio (when i double click on the proper event) is:

    protected void ItemRotator_DataBound(object sender, EventArgs e) {...}
    And I do not know how to get a reference to the specific item. 

    I tried this
    RadRotatorEventArgs Event = (RadRotatorEventArgs)e;
    but I get an error at runtime

    Is there a solution to my problem 
    Thank you for your time...
    Thomas Sarmis.
  2. Answer
    Fiko avatar
    1406 posts

    Posted 20 Dec 2010 Link to this post

    Hello Thomas,

    The correct event is ItemDataBound and you should attach a handler to that event. This is an example handler that you can use:

    Protected Sub RadRotator1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadRotatorEventArgs) Handles RadRotator1.ItemDataBound
    End Sub

    protected void RadRotator1_ItemClick(object sender, RadRotatorEventArgs e)

    Best wishes,
    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.
  3. Thomas
    Thomas avatar
    8 posts
    Member since:
    Dec 2010

    Posted 20 Dec 2010 Link to this post

    Thank you, Fiko. 

Back to Top