GridView.GetRelationCount(Int32) Method
Returns the number of relations for a particular master row.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
row |
Int32 | An integer value specifying the master row handle. |
#Returns
Type | Description |
---|---|
Int32 | An integer value indicating the number of relations for the specified master row. |
#Remarks
A View can have details if it is bound to a DataTable that has child relations or to a data source created at runtime implementing the IRelationList interface. In these cases, the GetRelationCount method returns the same value for any master row. The return value is specified by the bound data source. Note that you may also supply detail data dynamically by handling the GridView.MasterRowEmpty, GridView.MasterRowGetChildList, GridView.MasterRowGetRelationCount and GridView.MasterRowGetRelationName events. In this case, master rows can have a different number of details. The number of details for a particular master row is specified by the GridView.MasterRowGetRelationCount event handler.
Note
Detail pattern Views do not contain data and they are never displayed within Xtra
- Grid
Control. - returns the top most View in a grid;Main View - Grid
Control. - returns the focused View;Focused View - Grid
Control. - returns the currently maximized View;Default View - the sender parameter of View specific events;
- Grid
View. - returns a detail clone View for a specific master row.Get Detail View