Interface ITableColumnModel
- Namespace
- Htmx.Components.Table.Models
- Assembly
- Htmx.Components.dll
Represents a column in a table model with configuration for display, filtering, and editing capabilities.
public interface ITableColumnModel
- Extension Methods
Properties
CellEditPartialView
Gets or sets the custom partial view for rendering the cell in edit mode.
string? CellEditPartialView { get; set; }
Property Value
CellPartialView
Gets or sets the custom partial view for rendering the cell content.
string? CellPartialView { get; set; }
Property Value
ColumnType
Gets or sets the type of column (value selector or display).
ColumnType ColumnType { get; set; }
Property Value
DataName
Gets or sets the data property name that this column represents.
string DataName { get; set; }
Property Value
FilterPartialView
Gets or sets the custom partial view for rendering the filter control.
string? FilterPartialView { get; set; }
Property Value
Filterable
Gets or sets whether this column can be filtered.
bool Filterable { get; set; }
Property Value
GetInputModel
Gets the function that creates an input model for editing this column.
Func<ITableRowContext, Task<IInputModel>> GetInputModel { get; }
Property Value
Header
Gets or sets the display header text for the column.
string Header { get; set; }
Property Value
Id
Gets the unique identifier for this column.
string Id { get; }
Property Value
IsEditable
Gets or sets whether this column can be edited inline.
bool IsEditable { get; set; }
Property Value
Sortable
Gets or sets whether this column can be sorted.
bool Sortable { get; set; }
Property Value
Table
Gets or sets the reference to the parent table model.
ITableModel Table { get; set; }
Property Value
Methods
GetActionsAsync(ITableRowContext)
Gets the available actions for a specific row in this column.
Task<IEnumerable<ActionModel>> GetActionsAsync(ITableRowContext rowContext)
Parameters
rowContext
ITableRowContextThe context of the row to get actions for.
Returns
- Task<IEnumerable<ActionModel>>
A collection of action models for the row.
GetSerializedValue(ITableRowContext)
Gets the serialized string representation of the column value for the given row.
string GetSerializedValue(ITableRowContext rowContext)
Parameters
rowContext
ITableRowContextThe row context to get the serialized value from.
Returns
- string
The serialized column value.
GetValue(ITableRowContext)
Extracts the value for this column from the given row context.
object GetValue(ITableRowContext rowContext)
Parameters
rowContext
ITableRowContextThe row context to extract the value from.
Returns
- object
The column value for the specified row.