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

RadRotator.OnDataBound: EventArgs to RadRotatorEventArgs

2 Answers 80 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 16 Dec 2010, 11:31 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Fiko
Telerik team
answered on 20 Dec 2010, 12:19 PM
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:

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

C#:
protected void RadRotator1_ItemClick(object sender, RadRotatorEventArgs e)
{
}


Best wishes,
Fiko
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.
0
Thomas
Top achievements
Rank 1
answered on 20 Dec 2010, 12:26 PM
Thank you, Fiko. 

Tags
Rotator
Asked by
Thomas
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Thomas
Top achievements
Rank 1
Share this question
or