Skip to main content

GridControl.GetDetail(Int32, DataControlDetailDescriptor) Method

Returns the detail data control identified by the master row and its Detail Descriptor.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.1.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public DataControlBase GetDetail(
    int rowHandle,
    DataControlDetailDescriptor descriptor = null
)

Parameters

Name Type Description
rowHandle Int32

An integer value identifying the master row by its handle.

Optional Parameters

Name Type Default Description
descriptor DataControlDetailDescriptor null

Optional. A DataControlDetailDescriptor object that identifies the detail in case multiple details are available at this level. If not specified while multiple details are available, the first available detail data control is returned.

Returns

Type Description
DataControlBase

A DataControlBase descendant which displays detail data. Returns null (Nothing in Visual Basic) if no DataControlDetailDescriptor objects are used as details on this level or if corresponding details are collapsed.

Remarks

When you set up a master-detail hierarchy within a GridControl, you create Detail Descriptor objects which contain settings used to create actual detail controls. While there’s a single Detail Descriptor (template), there can be multiple detail controls - one per each expanded detail.

The GetDetail method returns the actual data control that displays detail data for the specified master row. This can be any DataControlBase descendant, but it will typically be a GridControl. If there are multiple details displaying data via DataControlBase descendants, you can identify the one you want to get by its corresponding template - DataControlDetailDescriptor object.

Note

The GetDetail method works with DataControlDetailDescriptor objects only.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetDetail(Int32, DataControlDetailDescriptor) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also