DetailDescriptorCollection Class

Stores a collection of Detail Descriptors.

Namespace: DevExpress.Xpf.Grid

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

Declaration

public class DetailDescriptorCollection :
    ObservableCollection<DetailDescriptorBase>
Public Class DetailDescriptorCollection
    Inherits ObservableCollection(Of DetailDescriptorBase)

Related API Members

The following members accept/return DetailDescriptorCollection objects:

Remarks

This class stores a collection of DetailDescriptorBase descendants. Such collections are exposed by Detail Descriptors that allow you to display multiple details on the same level.

DetailDescriptorCollection is the type of the MultiDetailDescriptor.DetailDescriptors property exposed by the TabViewDetailDescriptor class. In other words, you will need to use this collection when setting up multiple details to be displayed within a tabbed container.

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.

<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