RepositoryItem.NullText Property
Gets or sets the text that presents the editor’s null value (null, System.DBNull.Value and RepositoryItemDateEdit.NullDate - for DateEdit).
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | The string displayed in the edit box when the edit value equals null, System.DBNull.Value or RepositoryItemDateEdit.NullDate (for DateEdit controls). |
Remarks
Use the NullText property to present the editor’s null value with custom text.
Use the RepositoryItemTextEdit.NullValuePrompt property to display a hint in an editor when its value is not set.
See the RepositoryItemTextEdit.NullValuePrompt topic to learn more about the difference between these properties.
The NullText property is set to an empty string by default. Thus, to hide the default message, you can set this property to a string of spaces (blank string).
NullText is not supported for a CheckedComboBoxEdit control. This control’s value cannot be set to null.
For lookup editors (LookUpEditBase descendants), the NullText property’s default value is obtained from localization resources (the localization string ID is “StringId.LookUpEditValueIsNull”). The property’s default value is “[EditValue is null]” in the English culture.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the NullText 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.