Skip to content

Formatting AlignCenterAttribute [Columns]

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

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

This attribute can be used on a column field to specify the center alignment for column text. If not alignment attribute is defined, the alignment is left.

Attribute definition:

    public class AlignCenterAttribute : AlignmentAttribute
    {
        public AlignCenterAttribute();
    }

Use

    public class ProductColumns
    {
        [AlignCenter]
        public String ProductID { get; set; }
        [AlignCenter]
        public String ProductName { get; set; }

        [...]

See also:

Clone this wiki locally