Showing a selected items Data

2 posts, 1 answers
  1. Greg
    Greg avatar
    2 posts
    Member since:
    Sep 2008

    Posted 23 Sep 2009 Link to this post

    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.
  2. Answer
    Milan avatar
    1989 posts

    Posted 24 Sep 2009 Link to this post

    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,
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top