GridView.MasterRowGetRelationCount Event
Enables you to specify the number of details for individual master rows.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
[DXCategory("MasterDetail")]
public event MasterRowGetRelationCountEventHandler MasterRowGetRelationCount
#Event Data
The MasterRowGetRelationCount event's data class is MasterRowGetRelationCountEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Relation |
Gets or sets the number of relations for the master row. |
Row |
Gets a value identifying a master row. |
#Remarks
Handle the MasterRowGetRelationCount
event when implementing dynamic detail data loading. The event fires for master rows so that you can specify the number of details the processed row will have. The master row is identified by the MasterRowGetRelationCountEventArgs.RowHandle parameter. The number of details can be specified via the MasterRowGetRelationCountEventArgs.RelationCount parameter.
Important
Initially the Master
event fires with the e.
parameter set to Gride.
parameter to a positive value to enable master-detail mode when e.
is set to Grid
. Otherwise, master-detail mode will not be invoked.
Read the following topic for detailed information and examples: Working with Master-Detail Relationships in Code.