How to get selected item with ChartSelectionBehavior

Thread is closed for posting
3 posts, 1 answers
  1. Alexey
    Alexey avatar
    21 posts
    Member since:
    Aug 2013

    Posted 14 May 2014 Link to this post

    I have RadPieChart with one PieSeries. I've implemented ChartSelectionBehavior and want to know what item was selected. But ChartSelectionBehavior.SelectionChanged event doesn't provide any invormation about selected item.
  2. Alexey
    Alexey avatar
    21 posts
    Member since:
    Aug 2013

    Posted 18 May 2014 in reply to Alexey Link to this post

    I've found solution by myself.
    In SelectionChanged event for ChartSelectionBehavior use this code to find out current selected item:
    var selected = chart.Series[0].DataPoints.Where(x => x.IsSelected).FirstOrDefault();

  3. Answer
    Victor avatar
    1358 posts

    Posted 19 May 2014 Link to this post

    Hello Alexey,

    Thanks for writing.
    This solution should work however you can use the API exposed through ChartSelectionBehavior. If you cast the sender argument of the SelectionChanged event to ChartSelectionBehavior you will be able to say behavior.GetSelectedPoints().

    Please write again if you have more questions.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top