DisplayFormatAttribute::NullDisplayText Property
Gets or sets the text that is displayed for a field when the field's value is null.
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
Property Value
Type: System::String^The text that is displayed for a field when the field's value is null. The default is an empty string (""), which indicates that this property is not set.
Sometimes a data field's value is stored as null values in the source. You can specify custom text to display for data fields that have a null value by setting the NullDisplayText property. If this property is not set, null field values are displayed as empty strings ("").
Note |
|---|
To convert an empty string field value to a null value, you must set the ConvertEmptyStringToNull property to true. |
Available since 8
.NET Framework
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
