Back to Devexpress

ConvertEditValueEventArgs.Value Property

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

latest4.1 KB
Original Source

ConvertEditValueEventArgs.Value Property

Gets or sets either the edit or the display value of an editor.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public object Value { get; set; }
vb
Public Property Value As Object

Property Value

TypeDescription
Object

An object specifying either the edit or the display value of an editor.

|

Remarks

The Value property value depends on the event currently handled.

Note : you must set the ConvertEditValueEventArgs.Handled property value to true to override the default conversion or formatting algorithm.

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

csharp
private void checkedEdit_ParseEditValue(object sender, ConvertEditValueEventArgs e) {
    if (string.IsNullOrEmpty(Convert.ToString(e.Value))) {
        e.Value = noneValue;

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

csharp
if(fItem != null){
    e.Value = fItem.FilterName;
    e.Handled = true;

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

vb
If fItem IsNot Nothing Then
    e.Value = fItem.FilterName
    e.Handled = True

See Also

Handled

ConvertEditValueEventArgs Class

ConvertEditValueEventArgs Members

DevExpress.XtraEditors.Controls Namespace