[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]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]Selection
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Expand]Data Summaries
   [Expand]Paging and Scrolling
   [Expand]Focus and Navigation
   [Expand]Conditional Formatting
   [Expand]Drag-and-Drop
   [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]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]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Master-Detail Data Representation

The GridControl supports master-detail data presentation. In master-detail representation, the GridControl displays a set of detail (child) records for each master (parent) row.

You can display detail data in any visual form:

  • table - detail data are displayed within a nested grid;
  • custom - detail data are displayed within a custom data template;
  • tabbed - detail data are organized in tabbed layout, each tab can display a nested grid or custom content.

Expanded Getting Started

Refer to the Lesson 5 of GridControl's Getting Started to create a simple application that implements master-detail relations.

Expanded Detail Rendering Specifics

The detail descriptor content is used as a factory to create details. This means the standard layout customization properties do not work for details.

Tip

You can use the master view's DataViewBase.FocusedView property to get the focused detail view. This property returns the master view if it is focused.

Use the focused detail view's DataViewBase.DataControl property to get a focused detail GridControl instance.

Changing the column order and size in any detail grid affects all the detail grids simultaneously.

Note that detail grids are integrated into the master grid's Group Panel, Filter Panel, and other UI Elements. You can identify details in those elements by their captions (DataViewBase.DetailHeaderContent property values converted to strings).

Scrolling

Detail grids are built in the master grid visual tree. This means the master and detail grids share vertical and horizontal scrollbars.

Limitations

Refer to the Master-Detail Mode Limitations topic to learn about the master-detail mode's architectural limitations.

Expanded Expanding and Collapsing Master Rows

Use the GridControl.ExpandMasterRow and GridControl.CollapseMasterRow methods to expand and collapse master rows. You can collapse and expand master rows using a single GridControl.SetMasterRowExpanded method.

To get a specific row's state, use the GridControl.IsMasterRowExpanded.

Use the GridControl.MasterRowCollapsing and GridControl.MasterRowExpanding events to prevent master rows from collapsing or expanding.

The GridControl.MasterRowExpanded and GridControl.MasterRowCollapsed events allow you to perform additional processing after a master row was expanded or collapsed.

Expanded Obtaining Details

Use the GridControl.GetDetail to obtain a detail data control identified by the master row and its Detail Descriptor. This method returns null, if no DataControlDetailDescriptor objects are used as details on this level or if corresponding details are collapsed.

You can obtain detail controls and descriptors using the following methods:

Expanded Appearance Customization

Margins

The GridControl supports custom margins for the details. You can define detail margins using the DetailDescriptorBase.Margin property.

Expand Button Visibility

Use the TableView.IsDetailButtonVisibleBinding property to selectively display or hide detail expand buttons.

Expanded Examples

Expanded See Also

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