MasterRowCanExpandEventArgs.Allow Property

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

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public bool Allow { get; set; }
Public Property Allow As Boolean

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