HtmlForgeX

API Reference

Class

DataTablesSearchHighlighterConfig

Configuration for HTMLExtensions DataTables Search Highlighter plugin.

Inheritance

  • Object
  • DataTablesSearchHighlighterConfig

Constructors

public DataTablesSearchHighlighterConfig() #

Methods

ColumnHits 3 overloads
public DataTablesSearchHighlighterConfig ColumnHits(Action<DataTablesSearchHitStyle> configure) #
Returns: DataTablesSearchHighlighterConfig

Configures the default style used for hits produced by per-column filters.

Parameters

configure System.Action{HtmlForgeX.DataTablesSearchHitStyle} requiredposition: 0
public DataTablesSearchHighlighterConfig ColumnHits(Int32 columnIndex, Action<DataTablesSearchHitStyle> configure) #
Returns: DataTablesSearchHighlighterConfig

Configures a per-column style override used for hits produced by a specific column filter. The key can be a zero-based column index, column header text, DataTables column name, header id, or a data-column-id value.

Parameters

columnKey System.String requiredposition: 0
configure System.Action{HtmlForgeX.DataTablesSearchHitStyle} requiredposition: 1
ColumnHits(System.Int32 columnIndex, System.Action{HtmlForgeX.DataTablesSearchHitStyle} configure) #

Configures a per-column style override used for hits produced by a specific column filter.

Parameters

columnIndex System.Int32 required
configure System.Action{HtmlForgeX.DataTablesSearchHitStyle} required
public DataTablesSearchHighlighterConfig ColumnHitsPalette(Action<DataTablesSearchHitStyle> configure) #
Returns: DataTablesSearchHighlighterConfig

Adds a reusable per-column filter highlight style to the palette. Palette entries are applied by zero-based column index unless a specific per-column override exists.

Parameters

configure System.Action{HtmlForgeX.DataTablesSearchHitStyle} requiredposition: 0
public DataTablesSearchHighlighterConfig GlobalHits(Action<DataTablesSearchHitStyle> configure) #
Returns: DataTablesSearchHighlighterConfig

Configures the style used for hits produced by the global search box.

Parameters

configure System.Action{HtmlForgeX.DataTablesSearchHitStyle} requiredposition: 0
public DataTablesSearchHighlighterConfig Hits(Action<DataTablesSearchHitStyle> configure) #
Returns: DataTablesSearchHighlighterConfig

Configures the fallback style used for all search hits unless a more specific style is defined.

Parameters

configure System.Action{HtmlForgeX.DataTablesSearchHitStyle} requiredposition: 0

Properties

public Nullable<Boolean> Enabled { get; set; } #
JsonIgnore(Condition = 3)

Enable/disable the plugin (default true when config is present).

public Nullable<Int32> MinLength { get; set; } #
JsonIgnore(Condition = 3)

Minimum term length to highlight (default 1).

public Nullable<Boolean> CaseSensitive { get; set; } #
JsonIgnore(Condition = 3)

Case-sensitive matching (default false).

public Nullable<Boolean> IncludeGlobalSearch { get; set; } #
JsonIgnore(Condition = 3)

Include the global DataTables search term (default true).

public Nullable<Boolean> IncludeColumnSearch { get; set; } #
JsonIgnore(Condition = 3)

Include per-column search terms (default true).

public String Tag { get; set; } #
JsonIgnore(Condition = 3)

Tag name used for hits: "mark" or "span" (default mark).

public String ClassName { get; set; } #
JsonIgnore(Condition = 3)

CSS class applied to each hit (default "hfx-dt-search-hit").

public DataTablesSearchHitStyle HitStyle { get; set; } #
JsonIgnore(Condition = 3)

Optional inline styles applied to each highlighted hit. Mirrors the ColumnHighlighter target style shape (BackgroundColor/TextColor/Css).

public DataTablesSearchHitStyle GlobalHitStyle { get; set; } #
JsonIgnore(Condition = 3)

Optional inline styles applied only to hits coming from the global search box. Falls back to HitStyle when omitted.

public DataTablesSearchHitStyle ColumnHitStyle { get; set; } #
JsonIgnore(Condition = 3)

Optional inline styles applied only to hits coming from per-column filters. Falls back to HitStyle when omitted.

public Dictionary<String, DataTablesSearchHitStyle> ColumnHitStyles { get; set; } #
JsonIgnore(Condition = 3)

Optional per-column style overrides for filter hits. Keys can be a zero-based column index (for example "0"), a column header text (for example "Status"), a DataTables column name, a header id, or a data-column-id value. Falls back to ColumnHitStyle and then HitStyle when no specific override exists.

public List<DataTablesSearchHitStyle> ColumnHitStylePalette { get; set; } #
JsonIgnore(Condition = 3)

Optional reusable palette for per-column filter hits. When present, the style is chosen by zero-based column index modulo the palette length unless a more specific override is found in ColumnHitStyles.

public Dictionary<String, String> CssVars { get; set; } #
JsonIgnore(Condition = 3)

Optional CSS variables applied on the table element (keys must start with "--"). Useful for theming without custom CSS files (e.g. "--hfx-dt-search-hit-bg").