HiddenAttribute [Common]

Estrusco edited this page Sep 26, 2016 · 3 revisions
Clone this wiki locally

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

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

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

// This hiddent 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 hiddent the field only in column 
public class CustomerColumns
{
   [Hidden]
   public string StreetAddress { get; set; }

or

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

See also: