windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridview-7ff86195.md
Enables you to specify a pattern view to represent a particular detail.
Namespace : DevExpress.XtraGrid.Views.Grid
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXCategory("MasterDetail")]
public event MasterRowGetLevelDefaultViewEventHandler MasterRowGetLevelDefaultView
<DXCategory("MasterDetail")>
Public Event MasterRowGetLevelDefaultView As MasterRowGetLevelDefaultViewEventHandler
The MasterRowGetLevelDefaultView event's data class is MasterRowGetLevelDefaultViewEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| DefaultView | Gets or sets a pattern view to represent the detail View. |
| RelationIndex | Gets the relation index that identifies the affected detail. Inherited from CustomMasterRowEventArgs. |
| RowHandle | Gets the handle of the currently processed master row in the current View. Inherited from CustomMasterRowEventArgs. |
Handle the MasterRowGetLevelDefaultView event to specify a pattern view that will represent a particular detail. The current detail can be identified using the event’s CustomMasterRowEventArgs.RowHandle and CustomMasterRowEventArgs.RelationIndex parameters. To specify the pattern view, use the MasterRowGetLevelDefaultViewEventArgs.DefaultView parameter.
The event should be handled in the following cases:
The MasterRowGetLevelDefaultView should be handled if you need to provide Views that don’t belong to the GridControl.LevelTree tree. Otherwise, handle the GridView.MasterRowGetRelationName event to specify the View by the corresponding level name. Note that the MasterRowGetLevelDefaultView event overrides the GridView.MasterRowGetRelationName event.
See Also