InsertableAttribute [Common]

Estrusco edited this page Sep 8, 2016 · 2 revisions
Clone this wiki locally

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

This attribute con be used to make a field insertable or not. This attribute is applicable on entity row or form level.

public class InsertableAttribute: Attribute
{
    public InsertableAttribute(bool insertable = true);

    public bool Value { get; }
}

Use

[BasedOnRow(typeof(Entities.XYZRow))]
public class XYZForm
{
    [Insertable(false)]
    public Int32 IdCode { get; set; }

    [...]

See also: