Skip to main content
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET 6.0+ platform documentation. This link will take you to the parent topic of the current section.

WebPropertyEditor.NullText Property

Specifies the text that a Property Editor displays when its value is null or String.Empty.

Namespace: DevExpress.ExpressApp.Web.Editors

Assembly: DevExpress.ExpressApp.Web.v23.2.dll

NuGet Package: DevExpress.ExpressApp.Web

Declaration

public override string NullText { get; set; }

Property Value

Type Description
String

The text that a Property Editor displays when its value is null or String.Empty.

Remarks

The following ASP.NET Web Forms-specific View Controller shows how to specify this property for the “Address1” Property Editor in the Contact Detail View.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Web.Editors;
// ...
public class WebCustomizeNullTextValueController : ObjectViewController<DetailView, Contact> {
    protected override void OnActivated() {
        base.OnActivated();
        WebPropertyEditor propertyEditor = View.FindItem("Address1") as WebPropertyEditor;
        if (propertyEditor != null) {
            propertyEditor.NullText = "Type your text here...";
        }
    }
}

The following image illustrates the result.

To apply the same customization on platform-agnostic level, create a Controller in the Module project and use the PropertyEditor.NullText property.

Note

You can also set the NullText property in the Model Editor.

See Also