Skip to main content

MasterRowCanExpandEventArgs.Allow Property

Gets or sets a value specifying whether the current operation is allowed.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v23.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

public bool Allow { get; set; }

Property Value

Type Description
Boolean

true to allow the expanding/collapsing operation; otherwise, false

Remarks

The simplest use of the Allow property is when you just need to prohibit an operation on master rows. For instance, you may expand all master rows at application startup and stop them from being collapsed. To implement this, write a GridView.MasterRowCollapsing event handler that simply sets the Allow property to false.

You may also need to prevent expanded state changes for particular master rows only. In this case, you need to identify the master row being expanded or collapsed using the CustomMasterRowEventArgs.RowHandle property. Finally, when a View has several details, you may need to know which detail is affected by the current operation. Use the CustomMasterRowEventArgs.RelationIndex property to identify the detail.

See Also