Skip to main content
A newer version of this page is available. .

MasterRowGetRelationCountEventArgs.RelationCount Property

Gets or sets the number of relations for the master row.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

public int RelationCount { get; set; }

Property Value

Type Description
Int32

An integer value specifying the number of relations for the master row.

Remarks

Initially, the RelationCount property contains the default number of relations specified by the grid control’s data source. You can change this value to specify your own number of relations. For instance, you can provide detail data manually by handling the GridView.MasterRowGetChildList event while the data source actually has no detail data. To do so, set the RelationCount to a positive value specifying the number of details for the current row. In this case, the GridView.MasterRowEmpty and GridView.MasterRowGetRelationName events will also be raised for each row the number of times specified by the relation number.

The following code snippets (auto-collected from DevExpress Examples) contain references to the RelationCount property.

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