Skip to content

UI HiddenAttribute [Common]

Victor Tomaili edited this page May 3, 2021 · 1 revision

[namespace: Serenity.ComponentModel] - [assembly: Serenity.Core]

This attribute can be used to make a field invisible. This attribute is applicable on entity row, columns or form level.

The field is not visible, but accessible from script side.

// This will hide the field in column and in form
public class CustomerRow : Row
{
   [Hidden]
   public string StreetAddress
   {
      get { return Fields.StreetAddress[this]; }
      set { Fields.StreetAddress[this] = value; }
   }
}

or

// This will hide the field only in column 
public class CustomerColumns
{
   [Hidden]
   public string StreetAddress { get; set; }

or

// This will hide the field only in form
public class CustomerForm
{
   [Hidden]
   public string StreetAddress { get; set; }

See also:

Clone this wiki locally