[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]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 Dependent Details

The GridControl allows you to display different details for different master rows without any additional coding.

The image below demonstrates the GridControl that displays a list of Subordinates for the Vice President and a list of Customers for Sales Representatives.

The GridControl allows you to define a simple detail selection logic in XAML (using the DetailDescriptorSelector object) in the following way:

  1. Pass the DetailDescriptorSelector object to the GridControl.DetailDescriptor property.

    Note

    The DetailDescriptorSelector can be bound only to a corresponding master row object's properties.

  2. The DetailDescriptorSelector selects a detail descriptor when a corresponding trigger condition is met.

    The code sample below demonstrates how to provide a detail descriptor that is selected for master rows that meet specific criteria (Employees.Count == 0 in this example).

  3. To provide a default detail descriptor, pass the DataControlDetailDescriptor with the configured detail GridControl to the DetailDescriptorSelector.DefaultValue property.

You can assign any detail descriptor to the triggers as a default value: DataControlDetailDescriptor, ContentDetailDescriptor, TabViewDetailDescriptor, and DetailDescriptorSelector.

Expanded See Also

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