windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-customdisplaytexteventargs-ddd619e2.md
Gets an editor’s current value.
Namespace : DevExpress.XtraEditors.Controls
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public object Value { get; }
Public ReadOnly Property Value As Object
| Type | Description |
|---|---|
| Object |
An object that represents an editor’s current value.
|
The Value property contains the current value. To provide custom display text for this value, you can format the value according to your needs and then assign the string to the CustomDisplayTextEventArgs.DisplayText property.
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.
return;
e.DisplayText = GetCaption((Enum)e.Value);
}
winforms-lookup-display-custom-text-for-not-found-edit-value/CS/Form1.cs#L54
if(props != null && (e.Value is int)) {
object row = props.GetDataSourceRowByKeyValue(e.Value);
winforms-filtercontrol-implement-ifilteredcomponent/CS/Q200298/Form1.cs#L29
if (e.DisplayText == string.Empty) {
object o = e.Value;
}
winforms-lookup-display-custom-text-for-not-found-edit-value/VB/Form1.vb#L54
If props IsNot Nothing AndAlso (TypeOf e.Value Is Integer) Then
Dim row As Object = props.GetDataSourceRowByKeyValue(e.Value)
winforms-filtercontrol-implement-ifilteredcomponent/VB/Q200298/Form1.vb#L26
If Equals(e.DisplayText, String.Empty) Then
Dim o As Object = e.Value
End If
See Also
CustomDisplayTextEventArgs Class