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.ShowNullValuePromptWhenReadOnly Property

Gets or sets whether the read-only editor displays a prompt when its value is not specified.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[Browsable(false)]
public bool ShowNullValuePromptWhenReadOnly { get; set; }
<Browsable(False)>
Public Property ShowNullValuePromptWhenReadOnly As Boolean

Property Value

Type Default Description
Boolean

false

true, if the read-only editor displays a prompt when its value is not specified; otherwise, false.

Remarks

The editor can display a prompt when its value is not specified. Use the NullValuePrompt property to specify the prompt.

NullValuePrompt

textEdit1.Properties.NullValuePrompt = "Enter text to search...";

The ShowNullValuePrompt property provides access to the following flags that specify when the prompt is shown:

  • EmptyValue — the prompt is displayed when the editor's value equals String.Empty or null (Nothing in VB). Disable this option to only display the prompt when the editor's value equals null (Nothing in VB).

    This option is equivalent to the NullValuePromptShowForEmptyValue property.

  • EditorReadOnly — the prompt is displayed when the editor is in the read-only and editable states. Disable this option to only display the prompt when the editor is editable.

    This option is equivalent to the ShowNullValuePromptWhenReadOnly property.

  • EditorFocused — the prompt is displayed when the editor is focused and not focused. Disable this option to only display the prompt when the editor is not focused.

    This option is equivalent to the ShowNullValuePromptWhenFocused property.

The prompt disappears when the user clicks the focused editor or starts to enter a value. The prompt does not appear again if the user clears the entered value.

You can specify the flags in the Properties window.

The snippet below shows how to specify the flags in code.

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

Since version 19.2, all options are enabled — the default value is Default. For previous versions, all options are disabled — the default value is NullValue.

See Version Compatibility: Default Property Values for more information about changes introduced in specific versions.

See Also