Provides the ability to prevent particular cards from being collapsed.
NuGet Package: DevExpress.Win.Grid
[DXCategory("Behavior")] public event RowAllowEventHandler CardCollapsing
<DXCategory("Behavior")> Public Event CardCollapsing As RowAllowEventHandler
The CardCollapsing event's data class is RowAllowEventArgs. The following properties provide information specific to this event:
|Allow||Gets or sets a value specifying whether the current operation is allowed.|
|RowHandle||Gets the row’s handle (position). For the ColumnView.RowUpdated event, this property specifies the previous handle (position) of the currently processed row. NewItemRowHandle value when a new row is added. Inherited from RowEventArgs.|
The CardCollapsing event is raised when an attempt is made to collapse a card. Note that it doesn’t matter whether this is done by end-users or via code. The card is identified by the RowEventArgs.RowHandle parameter. To prevent it from being collapsed set the RowAllowEventArgs.Allow parameter to false.
When collapsing multiple cards at once via the CardView.CollapseAll method, the CardCollapsing event is raised only once. In this case, the RowEventArgs.RowHandle parameter returns an GridControl.InvalidRowHandle value. The RowAllowEventArgs.Allow parameter specifies whether the cards should be collapsed. Setting this parameter to false, prevents the cards from being collapsed.
Note this event is not raised if the CardOptionsBehavior.AllowExpandCollapse property is set to false.