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

GridView.MasterRowGetLevelDefaultView Event

Enables you to specify a pattern view to represent a particular detail.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v18.1.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.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MasterRowGetLevelDefaultView event.

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