This example demonstrates how to obtain records from the control's underlying data source for a selected cell or multiple selected cells asynchronously.
- MainWindow.xaml (VB: MainWindow.xaml)
- MainWindow.xaml.cs (VB: MainWindow.xaml.vb)
- DatabaseHelper.cs (VB: DatabaseHelper.vb)
The PivotGridControl.CellClick event raises when you click the Pivot Grid cell. The CreateDrillDownDataSourceAsync method returns the PivotDrillDownDataSource instance that contains underlying data for the current cell. The PivotDrillDownDataSource
object is used as the Grid Control's data source (it is assigned to the GridControl.ItemsSource property).
The PivotGridControl.CellSelectionChanged event raises when you select several Pivot Grid cells. The coordinates of the selected cells are obtained with the PivotGridControl.MultiSelection.SelectedCells notation. For each (X, Y) pair of cell coordinates, the CreateDrillDownDataSourceAsync method yields the PivotDrillDownDataSource object. The PivotDrillDownDataSource
exposes an enumerator and supports an iteration over a collection of PivotDrillDownDataRow objects. The PivotDrillDownDataRow.ListSourceRowIndex property value is an index of the record in the original data source, so the source record is also available and can be added to a collection. The resulting collection is bound to GridControl for display.
- Pivot Grid for WPF - How to Display Underlying (Drill-Down) Records
- Pivot Grid for WinForms - How to Create the Underlying Data Source (Drill-Down) Asynchronously
(you will be redirected to DevExpress.com to submit your response)