GridView.CanExpandMasterRowEx(Int32, Int32) Method
Indicates whether a master row can be expanded to display a particular detail.
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 containing master row handle. |
relation |
Int32 | A zero-based integer specifying the index of the relationship in the data source. |
#Returns
Type | Description |
---|---|
Boolean | true if the specified master row can be expanded; otherwise, false. |
#Remarks
The CanExpandMasterRowEx method returns false in the following cases:
- The specified row is not a master row. This means that the GridView.IsMasterRow method returns false for the specified row.
- The specified detail is empty and the View prohibits opening empty details. Note that you can specify whether particular details contain data manually. Handle the GridView.MasterRowEmpty event for this purpose. When using this event, you can supply detail data by handling the GridView.MasterRowGetChildList event. If a particular detail is empty, it can still be opened if the View’s GridOptionsDetail.AllowExpandEmptyDetails option is enabled.
- The GridView.MasterRowExpanding event handler doesn’t allow you to open the specified detail.
The CanExpandMasterRowEx method’s return value specifies whether calling the GridView.SetMasterRowExpandedEx method with the same parameters will be a success. This method also affects visual elements’ availability. If false is returned for a particular detail, this detail’s link is not displayed within a detail tooltip and the corresponding detail tab is invisible.
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