Back to Devexpress

EditProperties.ConvertEmptyStringToNull Property

aspnet-devexpress-dot-web-dot-editproperties-b2d36a22.md

latest2.0 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

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

Property Value

TypeDefaultDescription
Booleantrue

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

EditProperties Class

EditProperties Members

DevExpress.Web Namespace