All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

RepositoryItemTextEdit.ShowNullValuePrompt Property

Gets or sets conditions under which this editor should display its null value text (see the NullValuePrompt property).

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[DXCategory("Appearance")]
public ShowNullValuePromptOptions ShowNullValuePrompt { get; set; }
<DXCategory("Appearance")>
Public Property ShowNullValuePrompt As ShowNullValuePromptOptions

Property Value

Type Description
ShowNullValuePromptOptions

Specifies conditions under which this editor should display its null value text.

Remarks

If you specify the NullValuePrompt property, the editor displays this grayed-out text only when this editor is editable, not focused, and its EditValue is null. The ShowNullValuePrompt property allows you to expand the number of cases when the NullValuePrompt text is visible.

  • EmptyValue - the editor displays its NullValuePrompt text when the EditValue is null or empty (String.Empty).
  • EditorReadOnly - allows non-editable (read-only) editors with null value to display NullValuePrompt text.
  • EditorFocused - an editable editor with null value keeps showing its NullValuePrompt in both focused and unfocused states.
  • NullValue - none of the additional conditions are enabled.
  • Default - all three additional conditions are enabled.

The ShowNullValuePromptOptions is a flag enumeration, and the ShowNullValuePrompt property can accept more that one value.

textEdit1.Properties.ShowNullValuePrompt =
    ShowNullValuePromptOptions.EditorFocused | ShowNullValuePromptOptions.EmptyValue;

Note that the editor keeps its NullValuePrompt text until a user starts editing (clicks a focused or double-clicks an unfocused editor).

See Also