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

Onclick on SlideShowButtons

2 Answers 50 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Susanna
Top achievements
Rank 1
Susanna asked on 01 Jul 2010, 10:56 AM
Hi.

I have a rotator with one picture showing at a time.
How do I know which item is displayed in the rotator in my saveevent?

The user will not click on the displayed images only on the slideshowbuttons.
When a user clicks on the slideshowbutton I want to save the id for my imagedisplayed.
Is this possible? How?

Thank you.
//Ylva


2 Answers, 1 is accepted

Sort by
0
Susanna
Top achievements
Rank 1
answered on 01 Jul 2010, 12:46 PM
Hi again.

Can I set the OnItemClicked-event from code behind because I'm creating the rotator dynamically.

Best regards.
//Y
0
Fiko
Telerik team
answered on 01 Jul 2010, 02:58 PM
Hello Carl,

You can attach a handler to the ItemClick event of the RadRotator control using this code:

C#:
protected void Page_Load(object sender, EventArgs e)
{
    RadRotator1.ItemClick += new RadRotatorEventHandler(RadRotator1_ItemClick);
}
void RadRotator1_ItemClick(object sender, RadRotatorEventArgs e)
{
}

VB.NET:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    AddHandler RadRotator1.ItemClick, AddressOf RadRotator1_ItemClick
End Sub
 
Protected Sub RadRotator1_ItemClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadRotatorEventArgs)
 
End Sub


All the best,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Rotator
Asked by
Susanna
Top achievements
Rank 1
Answers by
Susanna
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or