Skip to main content

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.1.dll

NuGet Package: DevExpress.Win.Navigation


public virtual string NullText { get; set; }

Property Value

Type Description

The string displayed in the edit box when the edit value equals null, System.DBNull.Value or RepositoryItemDateEdit.NullDate (for DateEdit controls).


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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the NullText property.


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.

See Also