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

Carousel elements selection

1 Answer 69 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
xen acronyx
Top achievements
Rank 1
xen acronyx asked on 28 Nov 2009, 02:53 PM
Hi!
Can anyone tell me how can i select elements from a carousel with left and right arrows?

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 01 Dec 2009, 01:20 PM
Hi xen acronyx,

Thank you for writing. You can easy change the Carousel SelectedIndex on KeyUp event. For example:

//handle KeyUp event (in Form Load for example)
this
.radCarousel1.KeyUp += new KeyEventHandler(radCarousel1_KeyUp);
.....
void radCarousel1_KeyUp(object sender, KeyEventArgs e)
{          
 if (e.KeyCode == Keys.Left)
 {
  this.radCarousel1.SelectedIndex--;
 }
 else if (e.KeyCode == Keys.Right)
 {
  this.radCarousel1.SelectedIndex++;
 }
}

I hope this helps.

Sincerely yours,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Carousel
Asked by
xen acronyx
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or