HtmlForgeX

API Reference

Class

EmailDynamicTable`1

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Implements
ILayoutAware ISpaceable<EmailTable> IRoundable<EmailTable> IRoundable
Modifiers sealed

Table component that binds to a collection and uses configured columns.

Inheritance

Type Parameters

T

Constructors

public EmailDynamicTable<T>(IEnumerable<T> data) #

Initializes a new instance of the EmailDynamicTable class using the provided data source.

Parameters

data System.Collections.Generic.IEnumerable{`0} requiredposition: 0
Collection of items to build the table from.

Methods

public EmailDynamicTableColumn<T, TProp> Column<TProp>(String header, Func<T, TProp> selector) #
Returns: EmailDynamicTableColumn<T, TProp>

Type Parameters

TProp

Parameters

selector Expression<Func<T, TProp>> requiredposition: 0
Column``1 2 overloads
Column``1(System.Linq.Expressions.Expression{System.Func{`0,``0}} selector) #

Adds a column bound to the specified property.

Parameters

selector System.Linq.Expressions.Expression{System.Func{`0,``0}} required
Column``1(System.String header, System.Func{`0,``0} selector) #

Adds a column using a delegate selector (AOT-friendly) with an explicit header.

Parameters

header System.String required
selector System.Func{`0,``0} required

Properties

public Boolean Transpose { get; set; } #

Gets or sets a value indicating whether the table should transpose its rows and columns when rendered.