HtmlForgeX

API Reference

Class

TablerDataGridItem

Namespace HtmlForgeX
Assembly HtmlForgeX
Base Element

Represents an enhanced data grid item that supports rich content types, spacing configuration, and all features from Tabler's datagrid component without exposing HTML classes to users.

Inheritance

Constructors

Methods

AsPanel 4 overloads
public TablerDataGridItem AsPanel(Nullable<TablerColor> color = null, Boolean light = true, Nullable<TablerSpacing> paddingX = null, Nullable<TablerSpacing> paddingY = null, Nullable<TablerSpacing> marginY = null, Boolean rounded = true, Boolean border = true, Nullable<TablerColor> borderColor = null) #
Returns: TablerDataGridItem

Applies a native, alert-like panel appearance to the entire data grid item (title + content) without requiring raw CSS classes. This is useful for "callout" rows such as DNS Lookups/Mechanisms where a soft background, inner padding and subtle rounding improve legibility.

Parameters

color System.Nullable{HtmlForgeX.TablerColor} = null optionalposition: 0
Optional accent color; defaults to Secondary.
light System.Boolean = true optionalposition: 1
If true, uses the light variant (bg-*-lt). Otherwise uses solid background and readable text color.
paddingX System.Nullable{HtmlForgeX.TablerSpacing} = null optionalposition: 2
Horizontal padding scale (maps to px-*).
paddingY System.Nullable{HtmlForgeX.TablerSpacing} = null optionalposition: 3
Vertical padding scale (maps to py-*).
marginY System.Nullable{HtmlForgeX.TablerSpacing} = null optionalposition: 4
Vertical margin scale (maps to my-*).
rounded System.Boolean = true optionalposition: 5
Whether to add rounded corners.
border System.Boolean = true optionalposition: 6
Whether to render a subtle border.
borderColor System.Nullable{HtmlForgeX.TablerColor} = null optionalposition: 7
Optional border color.

Returns

The configured item.

public TablerDataGridItem AsPanel(RGBColor background, RGBColor text = null, Nullable<TablerSpacing> paddingX = null, Nullable<TablerSpacing> paddingY = null, Nullable<TablerSpacing> marginY = null, Boolean rounded = true, RGBColor borderColor = null) #
Returns: TablerDataGridItem

Applies a native panel appearance using custom RGB colors.

Parameters

background HtmlForgeX.RGBColor requiredposition: 0
text HtmlForgeX.RGBColor = null optionalposition: 1
paddingX System.Nullable{HtmlForgeX.TablerSpacing} = null optionalposition: 2
paddingY System.Nullable{HtmlForgeX.TablerSpacing} = null optionalposition: 3
marginY System.Nullable{HtmlForgeX.TablerSpacing} = null optionalposition: 4
rounded System.Boolean = true optionalposition: 5
borderColor HtmlForgeX.RGBColor = null optionalposition: 6
public TablerDataGridItem AsPanel(Action<DataGridPanelOptions> options, Action<DataGridPanelContent> content) #
Returns: TablerDataGridItem

Accent-only panel: neutral background, optional title accent dot and left border accent, plus rich inline content via a tiny builder.

Parameters

options System.Action{HtmlForgeX.DataGridPanelOptions} requiredposition: 0
content System.Action{HtmlForgeX.DataGridPanelContent} requiredposition: 1
public TablerDataGridItem AsPanel(Action<DataGridPanelOptions> options) #
Returns: TablerDataGridItem

Accent-only panel configuration without changing the content.

Parameters

options System.Action{HtmlForgeX.DataGridPanelOptions} requiredposition: 0
AvatarContent 2 overloads
public TablerDataGridItem AvatarContent(Action<TablerAvatar> config) #
Returns: TablerDataGridItem

Sets avatar content with user information.

Parameters

config System.Action{HtmlForgeX.TablerAvatar} requiredposition: 0
Configuration action for the avatar.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem AvatarContent(String userName, Action<TablerAvatar> config) #
Returns: TablerDataGridItem

Sets avatar content with user name.

Parameters

userName System.String requiredposition: 0
The user name to display.
config System.Action{HtmlForgeX.TablerAvatar} requiredposition: 1
Configuration action for the avatar.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem AvatarListContent(params Action<TablerAvatar>[] avatarConfigs) #
Returns: TablerDataGridItem

Sets avatar list content showing multiple users.

Parameters

avatarConfigs System.Action{HtmlForgeX.TablerAvatar}[] requiredposition: 0
Configuration actions for each avatar.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem BadgeContent(String text, TablerColor color = Primary, TablerBadgeStyle style = Normal) #
Returns: TablerDataGridItem

Sets badge content using TablerBadgeSpan.

Parameters

text System.String requiredposition: 0
The badge text.
color HtmlForgeX.TablerColor = Primary optionalposition: 1
The badge color.
style HtmlForgeX.TablerBadgeStyle = Normal optionalposition: 2
The badge style.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem CheckboxContent(Boolean isChecked = false, String label = null, String name = null) #
Returns: TablerDataGridItem

Sets checkbox content.

Parameters

isChecked System.Boolean = false optionalposition: 0
Whether the checkbox is checked.
label System.String = null optionalposition: 1
Optional label for the checkbox.
name System.String = null optionalposition: 2
Optional name attribute.

Returns

The TablerDataGridItem for method chaining.

Content 3 overloads
public TablerDataGridItem Content(Element content) #
Returns: TablerDataGridItem

Builds rich inline content using the InlineText builder. Emits a single root <span> inside the datagrid-content wrapper.

Parameters

rich System.Action{HtmlForgeX.InlineText} requiredposition: 0
public TablerDataGridItem Content(String content) #
Returns: TablerDataGridItem

Sets simple text content for this data grid item.

Parameters

content System.String requiredposition: 0
The content text.

Returns

The TablerDataGridItem for method chaining.

Content(HtmlForgeX.Element content) #

Sets element content for this data grid item.

Parameters

content HtmlForgeX.Element required
The content element.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem FormControlContent(String inputType = "text", String placeholder = null, String value = null, String name = null) #
Returns: TablerDataGridItem

Sets form control content (input field).

Parameters

inputType System.String = "text" optionalposition: 0
The input type (text, email, etc.).
placeholder System.String = null optionalposition: 1
Optional placeholder text.
value System.String = null optionalposition: 2
Optional default value.
name System.String = null optionalposition: 3
Optional name attribute.

Returns

The TablerDataGridItem for method chaining.

GetAuxiliaryChildren() #
public TablerDataGridItem HtmlContent(String htmlContent) #
Returns: TablerDataGridItem

Sets complex HTML content (for advanced scenarios).

Parameters

htmlContent System.String requiredposition: 0
The HTML content.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem IconContent(TablerIconType iconType, String text = null, Nullable<TablerColor> color = null) #
Returns: TablerDataGridItem

Sets icon content with optional text.

Parameters

iconType HtmlForgeX.TablerIconType requiredposition: 0
The icon type.
text System.String = null optionalposition: 1
Optional text to display with the icon.
color System.Nullable{HtmlForgeX.TablerColor} = null optionalposition: 2
Optional icon color.

Returns

The TablerDataGridItem for method chaining.

RegisterLibraries() #

Ensure tiny CSS helpers are injected when accent options or the enhanced content builder is used. Registration happens only when a Document exists.

public TablerDataGridItem Ribbon(String text, Nullable<TablerColor> color = null) #
Returns: TablerDataGridItem

Adds a small top ribbon chip to this row (works best on tinted/bordered panels).

Parameters

text System.String requiredposition: 0
color System.Nullable{HtmlForgeX.TablerColor} = null optionalposition: 1
public TablerDataGridItem StatusContent(String text, TablerColor color = Success) #
Returns: TablerDataGridItem

Sets status content with a status span.

Parameters

text System.String requiredposition: 0
The status text.
color HtmlForgeX.TablerColor = Success optionalposition: 1
The status color.

Returns

The TablerDataGridItem for method chaining.

Title 3 overloads
public TablerDataGridItem Title(Action<InlineText> rich) #
Returns: TablerDataGridItem

Sets the title for this data grid item.

Parameters

title System.String requiredposition: 0
The title text.

Returns

The TablerDataGridItem for method chaining.

Title(HtmlForgeX.Element element) #

Sets a custom element as the title (allows per-word coloring and richer content).

Parameters

element HtmlForgeX.Element required
Title(System.Action{HtmlForgeX.InlineText} rich) #

Builds a rich inline title using the InlineText builder. Emits a single root <span> inside the datagrid-title wrapper.

Parameters

rich System.Action{HtmlForgeX.InlineText} required
public override String ToString() #
Returns: String

Generates the HTML output for this data grid item.

Returns

The HTML string representation.

public TablerDataGridItem WithContentAlignment(TablerDataGridContentAlignment alignment) #
Returns: TablerDataGridItem

Sets the content alignment.

Parameters

alignment HtmlForgeX.TablerDataGridContentAlignment requiredposition: 0
The content alignment.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem WithCustomClasses(String cssClasses) #
Returns: TablerDataGridItem

Adds custom CSS classes to the item container (uses Tabler utilities when possible).

Parameters

cssClasses System.String requiredposition: 0
public TablerDataGridItem WithCustomSpacing(String customSpacing) #
Returns: TablerDataGridItem

Sets custom spacing for this item.

Parameters

customSpacing System.String requiredposition: 0
Custom CSS spacing value.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem WithCustomStyle(String cssStyle) #
Returns: TablerDataGridItem

Sets custom CSS styles for advanced customization.

Parameters

cssStyle System.String requiredposition: 0
Custom CSS style string.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem WithCustomTitleWidth(String customWidth) #
Returns: TablerDataGridItem

Sets custom title width.

Parameters

customWidth System.String requiredposition: 0
Custom CSS width value.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem WithMargin(TablerMargin margin) #
Returns: TablerDataGridItem

Sets margin using Tabler margin utilities.

Parameters

margin HtmlForgeX.TablerMargin requiredposition: 0
The margin value.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem WithPadding(TablerPadding padding) #
Returns: TablerDataGridItem

Sets padding using Tabler padding utilities.

Parameters

padding HtmlForgeX.TablerPadding requiredposition: 0
The padding value.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem WithSpacing(TablerDataGridSpacing spacing) #
Returns: TablerDataGridItem

Sets the spacing for this item using predefined values.

Parameters

spacing HtmlForgeX.TablerDataGridSpacing requiredposition: 0
The spacing value.

Returns

The TablerDataGridItem for method chaining.

public TablerDataGridItem WithTitleWidth(TablerDataGridTitleWidth width) #
Returns: TablerDataGridItem

Sets the title width using predefined values.

Parameters

width HtmlForgeX.TablerDataGridTitleWidth requiredposition: 0
The title width.

Returns

The TablerDataGridItem for method chaining.