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.1.dll
NuGet Package: DevExpress.ExpressApp.Web
Declaration
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.