Hi,
I have a Gridview and a Chart. The gridview can be filtered. what i would like is the chart to update its view based on the filter applied by the user but I cannot see how to bind the chart to the filtered list.
//Load data and bind to gridview
I have a Gridview and a Chart. The gridview can be filtered. what i would like is the chart to update its view based on the filter applied by the user but I cannot see how to bind the chart to the filtered list.
//Load data and bind to gridview
ObservableCollection<People> peopleByYearData = GetPeopleByYear();
gridViewPeople.ItemsSource = peopleByYearData;
//this displays the data on a simple bar chart.
chartPeopleByYear.ItemsSource = gridViewPeople.ItemsSource;
How do i ensure that the chart updates its view when the gridview is filtered?
i have tried hooking into the Filtered event of the gridview to try and get access to a list of filtered items but I cannot find any such list. The filter displays fine on the gridview but in the Filtered event the gridViewPeople.Items.Count is always == 0.
Thanks