Back to Devexpress

ConvertEditValueEventArgs.Handled Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-converteditvalueeventargs.md

latest4.0 KB
Original Source

ConvertEditValueEventArgs.Handled Property

Gets or sets a value specifying whether default edit value conversion/formatting is required.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Property Value

TypeDescription
Boolean

true to prohibit default edit value conversion/formatting; otherwise, false.

|

Remarks

Events used to convert and format the edit value (RepositoryItem.ParseEditValue and RepositoryItem.FormatEditValue) fire when the end-user accepts input. The Handled property specifies whether default conversion/formatting should be performed. By default, this property value is false. Hence, you must set the Handled property value to true when it is necessary to override default edit value conversion/formatting.

Note : if the Handled property value is false and the ConvertEditValueEventArgs.Value property has been modified, the default formatting/parsing algorithm will be applied to the value specified by the ConvertEditValueEventArgs.Value property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Handled 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.

xaf-how-to-display-an-enumeration-property-as-a-drop-down-box-with-check-boxes/CS/EFCore/EnumCheckBoxEF/EnumCheckBoxEF.Win/Editors/EnumPropertyEditorEx.cs#L63

csharp
e.Value = noneValue;
    e.Handled = true;
}

winforms-grid-rename-grid-filters-save-restore-layout/CS/WindowsApplication3/FilterNameProvider.cs#L63

csharp
e.Value = fItem.FilterName;
    e.Handled = true;
}

winforms-grid-rename-grid-filters-save-restore-layout/VB/WindowsApplication3/FilterNameProvider.vb#L76

vb
e.Value = fItem.FilterName
    e.Handled = True
End If

See Also

Value

ConvertEditValueEventArgs Class

ConvertEditValueEventArgs Members

DevExpress.XtraEditors.Controls Namespace