[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Binding to Data
   [Expand]Data Shaping
   [Expand]Data Analysis
   [Expand]Layout
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Appearance
   [Expand]MVVM Enhancements
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Collapse]Examples
    [Expand]Providing Data
    [Expand]Summarization
    [Expand]Sorting
    [Expand]Grouping
    [Expand]Filtering
    [Expand]Editing
    [Expand]Formatting
    [Collapse]Drill-Down (Underlying Data)
      How to: Obtain Underlying Data (Drill-Down)
      How to: Use CreateDrillDownDataSource Method to Get Underlying Data
    [Expand]Context Menu
    [Expand]Layout Features
    [Expand]Export
    [Expand]Appearance
    [Expand]Localization
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Obtain Underlying Data (Drill-Down)

This example demonstrates how to obtain the records from the control's underlying data source for a particular cell. Double-click a cell to invoke a form that contains a grid with the underlying data.

Note

The complete sample project How to: Display Underlying (Drill-Down) Records is available in the DevExpress Examples repository.

This example is based on the DevExpress MVVM Framework. When a user double-clicks a cell, the EventToCommand class invokes the bound ShowDrillDownDataCommand defined in the ViewModel.

To pass the event data as a parameter to the command, the EventToCommand.PassEventArgsToCommand property is set to true. The EventArgsToCellInfoConverter (see EventArgsToCellInfoConverter) instance is assigned to the EventToCommand.EventArgsConverter property to convert the event data to the CellInfo (see CellInfo) parameter type required for the command.

The command calls the DialogService.ShowDialog method to invoke a custom window that displays the underlying data. The DialogService is a part of the DevExpress MVVM Framework. It is defined in XAML and specifies the DXDialogWindow (see DXDialogWindow) that contains the GridControl (see GridControl) bound to the CellInfo.DrillDownDataSource property.

Is this topic helpful?​​​​​​​