Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("Behavior")]
public virtual string NullText { get; set; }

#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.

NullText

Use the RepositoryItemTextEdit.NullValuePrompt property to display a hint in an editor when its value is not set.

NullValuePrompt

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.

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.

See Also