Skip to content

[Hidden]

IntelliTect.Coalesce.DataAnnotations.HiddenAttribute

Mark an property as hidden from the edit, List or All areas.

DANGER

This attribute is not a security attribute - it only affects the rendering of the admin pages. It has no impact on data visibility in the API.

Do not use it to keep certain data private - use the Security Attributes family of attributes for that.

Example Usage

c#
public class Person
{
    public int PersonId { get; set; }

    [Hidden(HiddenAttribute.Areas.All)]
    public int? IncomeLevelId { get; set; }
}

Properties

// Also settable via constructor parameter #1
public Areas Area { get; set; } = Areas.All;

The areas in which the property should be hidden.

Enum values are:

  • HiddenAttribute.Areas.None Hide from no generated views. Primary and Foreign keys are hidden by default - setting this value explicitly can override this default behavior.
  • HiddenAttribute.Areas.All Hide from all generated views
  • HiddenAttribute.Areas.List Hide from admin list views only (c-admin-table)
  • HiddenAttribute.Areas.Edit Hide from admin editor only (c-admin-editor)

Coalesce is a free and open-source framework created by IntelliTect to fill our desire to create better apps, faster. IntelliTect is a high-end software architecture and development consulting firm based in Spokane, Washington.

If you're looking for help with your software project, whether it be a Coalesce application, other technologies, or even just an idea, reach out to us at info@intellitect.com — we'd love to start a conversation! Our clients range from Fortune 100 companies to local small businesses and non-profits.