Skip to main content
A newer version of this page is available. .

CustomizationFormDeletingCategoryEventArgs.CanDelete Property

Gets or sets a value specifying whether a row is allowed to be deleted.

Namespace: DevExpress.XtraVerticalGrid.Events

Assembly: DevExpress.XtraVerticalGrid.v18.2.dll

Declaration

public bool CanDelete { get; set; }

Property Value

Type Description
Boolean

true if the specified category row can be deleted from the VGridRows collection; otherwise, false.

Remarks

Use the CanDelete property to define whether the selected category row should be actually deleted. The deleted row can be accessed via the CategoryEventArgs.Category property.

If providing a handler for the VGridControlBase.CustomizationFormDeletingCategory event, the CanDelete property value is left set to true (the default value), the specified category row disappears from the Categories page of the Customization Form. This means that it is successfully deleted and no longer belongs to any row collection within your grid control. If the deleted row was a parent one (contained child rows), its children are processed based on the VGridOptionsBehavior.PreserveChildRows option setting:

  • If the option is false, all child rows are deleted as well;
  • If the option is true, child rows become hidden and are moved to the VGridControlBase.Rows collection representing top-level grid rows.

If the event handler sets the CanDelete property to false, rows are not deleted and remain displayed within the Categories page.

See Also