windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-customdisplaytexteventargs.md
Gets or sets an editor’s display text.
Namespace : DevExpress.XtraEditors.Controls
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
public string DisplayText { get; set; }
Public Property DisplayText As String
| Type | Description |
|---|---|
| String |
A string value that represents an editor’s display text.
|
Use the DisplayText property to specify custom display text for an editor. The editor’s current value is specified by the CustomDisplayTextEventArgs.Value property. You can format the value in a specific manner and then assign the text to the DisplayText property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the DisplayText 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#L57
if(row == null) {
e.DisplayText = NotFoundText;
}
winforms-filtercontrol-implement-ifilteredcomponent/CS/Q200298/Form1.cs#L28
private void OnhProductsCustomDisplayText(object sender, CustomDisplayTextEventArgs e) {
if (e.DisplayText == string.Empty) {
object o = e.Value;
winforms-lookup-display-custom-text-for-not-found-edit-value/VB/Form1.vb#L57
If row Is Nothing Then
e.DisplayText = NotFoundText
End If
winforms-filtercontrol-implement-ifilteredcomponent/VB/Q200298/Form1.vb#L25
Private Sub OnhProductsCustomDisplayText(ByVal sender As Object, ByVal e As CustomDisplayTextEventArgs)
If Equals(e.DisplayText, String.Empty) Then
Dim o As Object = e.Value
See Also
CustomDisplayTextEventArgs Class