Back to Devexpress

Data Dependent Details

wpf-119850-controls-and-libraries-data-grid-master-detail-data-dependent-details.md

latest1.9 KB
Original Source

Data Dependent Details

  • Dec 22, 2022
  • 2 minutes to read

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

View Example: Display Different Details Based on Master Row Data

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.

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

  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.