RepositoryItemTextEdit.NullValuePrompt Property
Gets or sets a grayed out hint displayed when the editor’s value is null or empty. This property is in effect for standalone editors and for editors embedded in toolbars and Ribbon controls. Not supported for in-place editors embedded in grid and tree list controls. Not supported for read-only editors.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
#Property Value
Type | Default | Description |
---|---|---|
String | System. |
A string that specifies the text displayed grayed out when the edit value is empty. |
#Remarks
Use the NullValuePrompt
property to display a hint in an editor when its value is not set.
Use the RepositoryItem.NullText property to present the editor’s null value with custom text.
The following table compares these two properties in more detail.
| Null | Null |
---|---|---|
Supported editors |
Note: Editors embedded in grid and treelist controls do not support the Null | All in-place and standalone editors |
Conditions, when the property’s text is displayed. | For any editor, when its edit value equals :
For Date
| For any editor, when its edit value equals :
For Date
|
Read-only editors | Null | Null |
Focused editors | Null | Null |
Text color | System | The foreground color specified by the Repository |
The editor’s Text property. | The Null | The Null |
The SearchControl displays the default “Enter text to search…” string even if you have not set the NullValuePrompt
property manually. To hide this text, assign a whitespace character to the NullValuePrompt
property.
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the NullValuePrompt 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.