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

EditProperties.ConvertEmptyStringToNull Property

Gets or sets a value that specifies whether empty string values are converted to a null reference when an inplace editor's value is retrieved from a data source field.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

[DefaultValue(true)]
public bool ConvertEmptyStringToNull { get; set; }
<DefaultValue(True)>
Public Property ConvertEmptyStringToNull As Boolean

Property Value

Type Default Description
Boolean

true

true if empty string values are converted to a null reference; otherwise, false.

Remarks

When an editor is used inplace within the ASPxGridView's column, the editor binds to a value retrieved from the column's associated data field. Use the ConvertEmptyStringToNull property to control whether empty string values should be converted to null values for the editor.

The ConvertEmptyStringToNull property is not in effect for the GridViewDataDateColumn object as a date column should not return an empty string to the server. If you need to pass an empty string to a data base, handle the RowUpdating and RowInserting events and convert required values from the e.NewValues array.

See Also