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

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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.

File: MySolution.Module.Web\Controllers\WebCustomizeNullTextValueController.cs.

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 MySolution.Module project and use the PropertyEditor.NullText property.

Note

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

See Also