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

Filter RadGridView data using Chart

1 Answer 40 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Sridhar
Top achievements
Rank 1
Sridhar asked on 10 Apr 2012, 12:10 PM
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

1 Answer, 1 is accepted

Sort by
0
Sridhar
Top achievements
Rank 1
answered on 10 Apr 2012, 01:54 PM
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
Tags
Chart
Asked by
Sridhar
Top achievements
Rank 1
Answers by
Sridhar
Top achievements
Rank 1
Share this question
or