GridView.MasterRowGetLevelDefaultView Event
Enables you to specify a pattern view to represent a particular detail.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.2.dll
Declaration
[DXCategory("MasterDetail")]
public event MasterRowGetLevelDefaultViewEventHandler MasterRowGetLevelDefaultView
Event Data
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. |
Remarks
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:
- when you need to specify the pattern View for individual detail clones. For instance, the master View can have a single child relation. You can handle the MasterRowGetLevelDefaultView event to represent detail clones corresponding to different master rows using different Views;
- when you provide detail data dynamically. Please refer Working with Master-Detail Relationships in Code document for additional information regarding this.
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.