MultiDetailDescriptor.DetailDescriptors Property

Provides access to Detail Descriptors to be displayed by this multi-detail container.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v20.2.Core.dll

Declaration

public DetailDescriptorCollection DetailDescriptors { get; }
Public ReadOnly Property DetailDescriptors As DetailDescriptorCollection

Property Value

Type Description
DetailDescriptorCollection

A DetailDescriptorCollection object containing Detail Descriptors to be displayed by this multi-detail container.

Remarks

When you need a GridControl to display multiple details, you need to assign a MultiDetailDescriptor descendant to the GridControl.DetailDescriptor property. This can be a TabViewDetailDescriptor object or another descendant. Once the required object is assigned, you need to populate it's DetailDescriptors collection with Detail Descriptors that you want to display.

Examples

The following example shows how to create a new grid and set up Master-Detail data representation in code. When setting up a Master-Detail hierarchy, a detail grid and a custom detail section are placed within a tabbed container. So, the following Detail Descriptor types are used: DataControlDetailDescriptor, ContentDetailDescriptor, and TabViewDetailDescriptor.

View Example

<dxg:GridControl Grid.Row="0" Name="gridControl1" AutoGenerateColumns="AddNew" >
    <dxg:GridControl.View>
        <dxg:TableView DetailHeaderContent="Employees" AutoWidth="True" ShowGroupPanel="False"  />
    </dxg:GridControl.View>
    <dxg:GridControl.DetailDescriptor>
        <dxg:TabViewDetailDescriptor>
            <dxg:TabViewDetailDescriptor.DetailDescriptors>
                <dxg:DataControlDetailDescriptor ItemsSourcePath="Orders">
                    <dxg:DataControlDetailDescriptor.DataControl>
                        <dxg:GridControl AutoGenerateColumns="AddNew">
                            <dxg:GridControl.View>
                                <dxg:TableView DetailHeaderContent="Orders" AutoWidth="True" ShowGroupPanel="False" />
                            </dxg:GridControl.View>
                        </dxg:GridControl>
                    </dxg:DataControlDetailDescriptor.DataControl>
                </dxg:DataControlDetailDescriptor>
                <dxg:ContentDetailDescriptor ContentTemplate="{StaticResource EmployeeNotes}" HeaderContent="Notes">
                </dxg:ContentDetailDescriptor>
            </dxg:TabViewDetailDescriptor.DetailDescriptors>
        </dxg:TabViewDetailDescriptor>
    </dxg:GridControl.DetailDescriptor>
</dxg:GridControl>
See Also