Back to Devexpress

MasterRowCanExpandEventArgs.Allow Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-masterrowcanexpandeventargs.md

latest2.5 KB
Original Source

MasterRowCanExpandEventArgs.Allow Property

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

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

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

Property Value

TypeDescription
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

RowHandle

RelationIndex

MasterRowCanExpandEventArgs Class

MasterRowCanExpandEventArgs Members

DevExpress.XtraGrid.Views.Grid Namespace