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

Showing a selected items Data

1 Answer 64 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 23 Sep 2009, 08:55 PM
I've created a Carousel passing a list using the ItemSource member. What I would like to do is get data from the item that was clicked on. So for example one of the values in the list is title, when I click on an item I would like to pass the Title of the item I clicked. I created a MouseDown Handler but I can't figure out how to get that data.
Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 24 Sep 2009, 08:40 AM
Hi Greg,

Whenever you click on an item it will be selected automatically. If you subscribe to the SelectionChanged event of RadCarousel you will be notified when a new item is selected and also you will be able to get the desired data:

void RadCarousel1_SelectionChanged(object sender, SelectionChangeEventArgs e)  
{  
    var title = ((MyDataType)this.RadCarousel1.SelectedItem).Title;  


All the best,
Milan
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
Greg
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or