Back to Devexpress

QueryDisplayTextEventArgs.EditValue Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-querydisplaytexteventargs-e9f7dd4c.md

latest3.0 KB
Original Source

QueryDisplayTextEventArgs.EditValue Property

Gets the current edit value.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public object EditValue { get; }
vb
Public ReadOnly Property EditValue As Object

Property Value

TypeDescription
Object

An object representing the editor’s value.

|

Remarks

Use the EditValue property to get the value to be formatted. To specify a custom display text for the currently processed value, use the QueryDisplayTextEventArgs.DisplayText property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EditValue 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.

winforms-create-editable-grid-lookup/CS/PopupContainerEditSelection/Form1.cs#L41

csharp
{
    e.DisplayText = e.EditValue != null ? e.EditValue.ToString() : "";
}

winforms-create-editable-grid-lookup/VB/PopupContainerEditSelection/Form1.vb#L32

vb
Private Sub popupContainerEdit1_QueryDisplayText(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.QueryDisplayTextEventArgs)
    e.DisplayText = If(e.EditValue IsNot Nothing, e.EditValue.ToString(), "")
End Sub

See Also

DisplayText

QueryDisplayText

QueryDisplayTextEventArgs Class

QueryDisplayTextEventArgs Members

DevExpress.XtraEditors.Controls Namespace