wpf-devexpress-dot-xpf-dot-grid-dot-showingeditoreventargsbase.md
Gets or sets the value indicating whether to prevent showing the editor.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public bool Cancel { get; set; }
Public Property Cancel As Boolean
| Type | Description |
|---|---|
| Boolean |
true to cancel the action; otherwise, false.
|
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Cancel property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-data-grid-disable-rows-based-on-their-values/CS/WpfApplication/DisableRowBehavior.cs#L17
if(e.Column.FieldName != nameof(Item.AllowEdit))
e.Cancel = !(AssociatedObject.DataControl.CurrentItem as Item).AllowEdit;
}
wpf-data-grid-disable-rows-based-on-their-values/VB/WpfApplication/DisableRowBehavior.vb#L20
Private Sub OnEditorShowing(ByVal sender As Object, ByVal e As ShowingEditorEventArgs)
If Not Equals(e.Column.FieldName, NameOf(Item.AllowEdit)) Then e.Cancel = Not TryCast(AssociatedObject.DataControl.CurrentItem, Item).AllowEdit
End Sub
See Also
ShowingEditorEventArgsBase Class