Table of Contents

Class IconColumn<T>

Namespace
AbanoubNassem.Trinity.Columns
Assembly
AbanoubNassem.Trinity.dll

Represents a column that displays icons.

public class IconColumn<T> : TrinityColumn<IconColumn<T>, T>, ITrinityColumn, ITrinityComponent

Type Parameters

T

The type of the value displayed in the column.

Inheritance
IconColumn<T>
Implements
Derived
Inherited Members

Constructors

IconColumn(string)

public IconColumn(string columnName)

Parameters

columnName string

Properties

ComponentName

The component name in the front-end side.

public override string ComponentName { get; }

Property Value

string

FalseColor

Gets or sets the color used for false in the boolean column.

public string? FalseColor { get; protected set; }

Property Value

string

FalseIcon

Gets or sets the icon used for false in the boolean column.

public string? FalseIcon { get; protected set; }

Property Value

string

FalseValue

Gets or sets the value used for false in the boolean column.

public T? FalseValue { get; protected set; }

Property Value

T

IsBoolean

Gets or sets a value indicating whether the column is a boolean column.

public bool IsBoolean { get; protected set; }

Property Value

bool

Options

Gets or sets the list of options for the column.

public List<object>? Options { get; protected set; }

Property Value

List<object>

TrueColor

Gets or sets the true color of the icon column.

public string? TrueColor { get; protected set; }

Property Value

string

TrueIcon

Gets or sets the icon used for true in the boolean column.

public string? TrueIcon { get; protected set; }

Property Value

string

TrueValue

Gets or sets the value used for true in the boolean column.

public T? TrueValue { get; protected set; }

Property Value

T

Methods

SetAsBoolean(bool)

Sets the column as a boolean column.

public IconColumn<T> SetAsBoolean(bool isBoolean = true)

Parameters

isBoolean bool

A value indicating whether the column is a boolean column.

Returns

IconColumn<T>

The current instance of the IconColumn<T> class.

SetFalseIcon(string, string)

Sets the icon and color for the false value of the icon column.

public IconColumn<T> SetFalseIcon(string falseIcon, string falseColor = "red")

Parameters

falseIcon string

The icon for the false value.

falseColor string

The color for the false value. Default is "red".

Returns

IconColumn<T>

The current instance of the IconColumn<T> class.

SetFalseValue(T)

Sets the value used for false in the boolean column.

public IconColumn<T> SetFalseValue(T value)

Parameters

value T

The value used for false.

Returns

IconColumn<T>

The current instance of the IconColumn<T> class.

SetOptions(params (T?, string, string)[])

Sets the list of options for the column with the specified values, icons and colors.

public IconColumn<T> SetOptions(params (T?, string, string)[] options)

Parameters

options (T, string, string)[]

The list of options.

Returns

IconColumn<T>

The current instance of the IconColumn<T> class.

SetOptions(params (T?, string)[])

Sets the list of options for the column with the specified values and icons.

public IconColumn<T> SetOptions(params (T?, string)[] options)

Parameters

options (T, string)[]

The list of options.

Returns

IconColumn<T>

The current instance of the IconColumn<T> class.

SetTrueIcon(string, string)

Sets the icon and color for the true value of the icon column.

public IconColumn<T> SetTrueIcon(string trueIcon, string trueColor = "green")

Parameters

trueIcon string

The icon for the true value.

trueColor string

The color for the true value. Default is "green".

Returns

IconColumn<T>

The current instance of the IconColumn<T> class.

SetTrueValue(T)

Sets the value used for true in the boolean column.

public IconColumn<T> SetTrueValue(T value)

Parameters

value T

The value used for true.

Returns

IconColumn<T>

The current instance of the IconColumn<T> class.