Drill Down
The value of a particular PivotCellElement is calculated depending on the applied row and column groups together with the aggregate descriptions.
The LocalDataSourceProvider exposes a GetUnderlyingData method which allows extracting the records from the data source object responsible for accumulating the result for a particular row and column. The GetUnderlyingData method is working with two parameters: Row Group and Column Group.
In the example below we will handle RadPivotGrid.MouseDoubleClick event and use the retrieved IEnumerable object to bind RadGridView and display the result.
Figure 1: Drill Down Data
GetUnderlyingData Method
The underlying data can be retrieved by handling the GetUnderlyingDataCompleted event and accessing the DrillDownCompletedEventArgs arguments:
- Result: An IEnumerable representing the result of the underlying data extraction operation.
- InnerExceptions: A read-only collection with the thrown exceptions during the underlying data extraction.
If the DeferUpdates property of the LocalDataSourceProvider is set to true, calling the GetUnderlyingData method without first updating the provider will result in an InvalidOperationException.
The underlying data is extracted asynchronously when using the assemblies built for .NET 4.0. In this respect it is necessary to use BeginInvoke if the retrieved data will be used on the UI thread.