Filter RadGridView data using Chart

2 posts, 0 answers
  1. Sridhar
    Sridhar avatar
    9 posts
    Member since:
    Sep 2011

    Posted 10 Apr 2012 Link to this post

    Hi All,

      We have an application in which we use chart control with grid which is very similar to the Aggregates shown in the demo - http://demos.telerik.com/silverlight/#Chart/Aggregates 

    Now I wonder if there is a way to filter the DataGrid when the user clicks on a bar series? For instance in the demo, if I click on the bar that says "Supermarkets", the grid should show data related to only this item.

    Regards
    Sridhar
  2. Sridhar
    Sridhar avatar
    9 posts
    Member since:
    Sep 2011

    Posted 10 Apr 2012 Link to this post

    Hi All,

      I found a solution for this, may not be the best way, but it seems to work just fine... 

    On ChartArea_ItemClick event, get the data points and type cast it to 

    e.DataPoint.DataItem as List<KeyValuePair<string, string>>

    then use the FilterDescriptors of QueryableCollectionView, which is bound to the grid...

    Regards
    Sridhar
  3. DevCraft banner
Back to Top