A newer version of this page is available. Switch to the current version.

RepositoryItemTimeSpanEdit.NullTimeSpan Property

Gets or sets a value that is interpreted as the null value assigned to the TimeSpanEdit.TimeSpan property when TimeSpanEdit.EditValue is set to null or any value that cannot be converted to the TimeSpan type.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.1.dll


public TimeSpan? NullTimeSpan { get; set; }

Property Value

Type Default Description


The value regarded as the null value.


The editor’s TimeSpanEdit.TimeSpan property (which is of the TimeSpan type) is in sync with the editor’s TimeSpanEdit.EditValue property (which is of the Object type). When you set the TimeSpan property, the same value is assigned to the EditValue property. When you assign a value to the EditValue property, this value is converted to the TimeSpan type and assigned to the editor’s TimeSpan property.

When the EditValue property is set to null or any object that cannot be converted to a valid TimeSpan value, the editor’s TimeSpan property is set to a special null value. By default, the null value is equal to the static TimeSpan.Zero field value. You can specify a custom null value with the NullTimeSpan property. If the NullTimeSpan property is set to null, static TimeSpan.Zero field value is regarded as the null value.

When the editor’s EditValue property is set to null, DBNull or NullTimeSpan, the editor displays an empty string. To display a custom string in these cases, assign it to the RepositoryItem.NullText property.

See Also