Table of Contents

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

string

CellPartialView

Gets or sets the custom partial view for rendering the cell content.

string? CellPartialView { get; set; }

Property Value

string

ColumnType

Gets or sets the type of column (value selector or display).

ColumnType ColumnType { get; set; }

Property Value

ColumnType

DataName

Gets or sets the data property name that this column represents.

string DataName { get; set; }

Property Value

string

FilterPartialView

Gets or sets the custom partial view for rendering the filter control.

string? FilterPartialView { get; set; }

Property Value

string

Filterable

Gets or sets whether this column can be filtered.

bool Filterable { get; set; }

Property Value

bool

GetInputModel

Gets the function that creates an input model for editing this column.

Func<ITableRowContext, Task<IInputModel>> GetInputModel { get; }

Property Value

Func<ITableRowContext, Task<IInputModel>>

Header

Gets or sets the display header text for the column.

string Header { get; set; }

Property Value

string

Id

Gets the unique identifier for this column.

string Id { get; }

Property Value

string

IsEditable

Gets or sets whether this column can be edited inline.

bool IsEditable { get; set; }

Property Value

bool

Sortable

Gets or sets whether this column can be sorted.

bool Sortable { get; set; }

Property Value

bool

Table

Gets or sets the reference to the parent table model.

ITableModel Table { get; set; }

Property Value

ITableModel

Methods

GetActionsAsync(ITableRowContext)

Gets the available actions for a specific row in this column.

Task<IEnumerable<ActionModel>> GetActionsAsync(ITableRowContext rowContext)

Parameters

rowContext ITableRowContext

The 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 ITableRowContext

The 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 ITableRowContext

The row context to extract the value from.

Returns

object

The column value for the specified row.