[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
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Collapse]Master-Detail Data Representation
     Data Grid in Details
     Custom Content in Details
     Tabbed View for Details
     Data Dependent Details
     Master-Detail Mode Limitations
     Master-Detail Member Table
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus, Navigation, Selection
   [Expand]Drag-and-Drop
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]End-User Interaction
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [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)

Data Grid in Details

This topic describes how to display detail data within nested grids.

Expanded Enable the Master-Detail Representation

  1. Ensure the master GridControl's TableView.AllowMasterDetail property is unspecified or set to true.
  2. Create a DataControlDetailDescriptor object and assign it to the GridControl.DetailDescriptor property.
  3. Create a GridControl and assign it to the DataControlDetailDescriptor.DataControl property. This GridControl is used to generate detail grids. The master GridControl builds a visual tree with detail grids.
  4. Specify the DataControlDetailDescriptor.ItemsSourcePath, DataControlDetailDescriptor.ItemsSourceValueConverter, or DataControlDetailDescriptor.ItemsSourceBinding property to bind the detail GridControl to a data source. The binding source is the master row object.

Expanded Handle Detail Grid Events

The master GridControl creates a copy of the DataControlDetailDescriptor.DataControl object for each expanded master row. In the detail GridControl/TableView object's event handlers, use the e.Source property to obtain the current detail grid.

Expanded Master-Detail vs TreeListView

The table below describes the difference between the DataControlDetailDescriptor and TreeListView.

Master-Detail (DataControlDetailDescriptor)

TreeListView

Data operations, settings synchronization

  • The master and detail grids work independently and can display different columns.
  • Data operations (sorting, filtering) work independently.
  • The column order, widths, and other settings are not synchronized.
  • Settings of the detail grid controls at the same level are automatically synchronized.
  • The same columns are used at all levels.
  • Data operations (sorting, filtering) work across all levels.

Provide data for details

Use the following properties:

Use the following approaches:

Group Data at runtime

Yes

No

Display a multi-level structure

Set the detail grid's GridControl.DetailDescriptor property to display one more level.

The TreeListView (see TreeListView) creates child nodes according to its configuration in bound mode.

Display a different number of levels for different master rows

The total number of levels is fixed. Use the IsDetailButtonVisibleBinding (see TableView.IsDetailButtonVisibleBinding) property to hide expand buttons for certain items

The number of levels is not limited. Different nodes can have a different number of levels.

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