RadGridView – RadChartView integration
Date Posted | Product | Author |
---|---|---|
January 07, 2015 | Telerik UI for WinForms | Desislava Yordanova |
Problem
This article demonstrates how to implement integration between RadGridView and RadChartView.
Solution
1. First, let's populate the RadGridView with data. For this purpose, we will bind it to the NorthWind.OrderDetails table.
2. You should enable multiple selection in RadGridView by setting its MultiSelect property to true. Additionally, you need to change the SelectionMode property to CellSelect. Thus, you will be able to select specific grid cells and populate the RadChartView with the respective data.
3. Subscribe to the RadGridView.SelectionChanged event and generate a BarSeries for each distinct column that participates in the grid’s selection. Afterwards, add the cell value as a *CategoricalDataPoint *to the series:
A complete solution in C# and VB.NET can be found here.