The requested page is not available for the requested platform. You are viewing the content for Default platform.

ListEditor.ProtectedContentText Property

Specifies the text that is used by a List Editor to display a property which is prohibited for viewing by the current user.

Namespace: DevExpress.ExpressApp.Editors

Assembly: DevExpress.ExpressApp.v18.2.dll


public string ProtectedContentText { get; set; }
Public Property ProtectedContentText As String

Property Value

Type Description

A string value that represents text to be displayed by a List Editor if a user does not have permission to view an object's property. The default value is specified by the ProtectedContentText property of the Application Model's Application node.


Use this property to set the text that will be displayed instead of an actual value of a property that is prohibited for viewing by the current user by the Security System. This text is not available at the data source level and in Mobile applications (original property values are displayed instead of this text). Protected properties return default type values instead of actual values. The null (Nothing in VB) value is returned for reference properties, zero - for integer properties, DateTime.MinValue - for DateTime properties.


This example demonstrates a Controller which sets different ProtectedContentText values for different List Views.

If the current List View displays objects of the ProtectedContentRootObject type, the ProtectedContentText property's value is changed to "You cannot view inaccessible properties".

The image below shows the resulting List View's List Editor:


using System;
using DevExpress.ExpressApp;

public partial class CustomProtectedStrings : ViewController {

   public CustomProtectedStrings() {           
      TargetViewType = ViewType.ListView;
      Activated += new System.EventHandler(this.CustomProtectedStrings_Activated);

   private void CustomProtectedStrings_Activated(object sender, EventArgs e) {
      if ((View as ListView).ObjectType == typeof(ProtectedContentRootObject)) {
         (View as ListView).Editor.ProtectedContentText = 
            "You cannot view inaccessible properties";
See Also