Class IconColumn<T>
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
-
TrinityComponent<IconColumn<T>, T>TrinityColumn<IconColumn<T>, T>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
FalseColor
Gets or sets the color used for false in the boolean column.
public string? FalseColor { get; protected set; }
Property Value
FalseIcon
Gets or sets the icon used for false in the boolean column.
public string? FalseIcon { get; protected set; }
Property Value
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
Options
Gets or sets the list of options for the column.
public List<object>? Options { get; protected set; }
Property Value
TrueColor
Gets or sets the true color of the icon column.
public string? TrueColor { get; protected set; }
Property Value
TrueIcon
Gets or sets the icon used for true in the boolean column.
public string? TrueIcon { get; protected set; }
Property Value
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
boolA 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
stringThe icon for the false value.
falseColor
stringThe 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
TThe 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
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
stringThe icon for the true value.
trueColor
stringThe 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
TThe value used for true.
Returns
- IconColumn<T>
The current instance of the IconColumn<T> class.