Back to Devexpress

IRelationList.GetDetailList(Int32, Int32) Method

corelibraries-devexpress-dot-data-dot-irelationlist-dot-getdetaillist-x28-system-dot-int32-system-dot-int32-x29.md

latest3.9 KB
Original Source

IRelationList.GetDetailList(Int32, Int32) Method

When implemented by a class, returns detail data for a relationship.

Namespace : DevExpress.Data

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
IList GetDetailList(
    int index,
    int relationIndex
)
vb
Function GetDetailList(
    index As Integer,
    relationIndex As Integer
) As IList

Parameters

NameTypeDescription
indexInt32

An integer value that specifies the index of a master row in the data source.

| | relationIndex | Int32 |

An integer value that specifies the relationship.

|

Returns

TypeDescription
IList

An object that implements the IList interface and represents detail data for a relationship.

|

Remarks

This method is called in turn for each relationship for each master row. Use this method to supply data for particular relationships.

The relationIndex parameter specifies a value between 0 and RelationCount - 1 , where RelationCount is the number of relationships for the currently processed row. The number of relationships is identified:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetDetailList(Int32, Int32) 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.

winforms-grid-vertically-align-detail-views/CS/DetailsUnderEachOther/Form1.cs#L89

csharp
private IList GetRelationList(GridView view, int listSourceRow, int relationIndex) {
    return view.DataController.Helper.RelationList.GetDetailList(listSourceRow, relationIndex);
}

winforms-grid-vertically-align-detail-views/VB/DetailsUnderEachOther/Form1.vb#L93

vb
Private Function GetRelationList(ByVal view As GridView, ByVal listSourceRow As Integer, ByVal relationIndex As Integer) As IList
    Return view.DataController.Helper.RelationList.GetDetailList(listSourceRow, relationIndex)
End Function

See Also

Working with Master-Detail Relationships in Code

IRelationList Interface

IRelationList Members

DevExpress.Data Namespace