4 Answers, 1 is accepted
0
Hi,
Please take a look at our help topic describing and showing how to use the selection behavior.
Hope that helps.
Regards,
Peshito
Telerik
Please take a look at our help topic describing and showing how to use the selection behavior.
Hope that helps.
Regards,
Peshito
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Ahmed
Top achievements
Rank 1
answered on 27 May 2014, 08:39 AM
Thanks Peshito,
I'm able to get the selected points, but what I want is that When the user selected an item in the Gridview (which presents the same collection), I want the same point get selected in the chart view.
Note: The ItemsSource for both controls is same QueryableCollectionView.
Thanks,
I'm able to get the selected points, but what I want is that When the user selected an item in the Gridview (which presents the same collection), I want the same point get selected in the chart view.
Note: The ItemsSource for both controls is same QueryableCollectionView.
Thanks,
0
Hello,
This can be achieved by wiring to GridView's SelectionChanged event.
For instance:
Using the RemovedItems and AddedItems collections allows you to iterate trough and then depending on a custom logic to select what chart's data points to be selected as well.
Regards,
Peshito
Telerik
This can be achieved by wiring to GridView's SelectionChanged event.
For instance:
void gridView_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
{
var removed = e.RemovedItems;
var add = e.AddedItems;
foreach (var gridViewItem in e.RemovedItems.OfType<
MyObject
>())
{
foreach (var chartViewItem in (chart.Series[0] as BarSeries).DataPoints)
{
if (chartViewItem.Value == gridViewItem.ID)
{
chartViewItem.IsSelected = false;
}
}
}
foreach (var gridViewItem in e.AddedItems.OfType<
MyObject
>())
{
foreach (var chartViewItem in (chart.Series[0] as BarSeries).DataPoints)
{
if (chartViewItem.Value == gridViewItem.ID)
{
chartViewItem.IsSelected = true;
}
}
}
}
Regards,
Peshito
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Ahmed
Top achievements
Rank 1
answered on 29 May 2014, 02:20 PM
Thanks Peshito,,
The solution worked.
The solution worked.