Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MasterRowCanExpandEventArgs.Allow Property

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

Namespace: DevExpress.XtraGrid.Views.Grid

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