Skip to main content

LgGridTagBoxColumn

LgGridTagBoxColumn manages free-text tags. It inherits from LgGridBaseTextColumn<TItem, List<string>>.

<Columns Context="item">
<LgGridTagBoxColumn @bind-Value="item.Tags"
Title="#Tags"
Placeholder="#TagsPlaceholder"
MaxTags="5" />
</Columns>
  • NuGet package: Lagoon.UI.GridView

Common parameters are documented in LgGridBaseColumn.

Specific parameters​

NameTypeDefaultDescription
TagBoxCssClassstringnullCSS classes for the TagBox.
TagBoxItemCssClassstring"label label-info"CSS classes applied to each tag.
PlaceholderstringnullPlaceholder for the input field.
MaxTagsint?nullMaximum number of tags.
MaxCharsint?nullMaximum length of a tag.
ConfirmKeysList<int>[13,59,44]Keys confirming input: Enter, ;, ,.
Delimiterstring";"Delimiter used for the value.
AllowDuplicatesboolfalseAllows duplicates.
NoWrapboolfalseFixed height with horizontal scroll.

Usage​

Free tags in cell editing​

GridTagBoxColumnPage.razor
@inherits LgPage

<LgGridView StateId="orders-tagbox-column"
Items="_orders"
EditMode="GridEditMode.Cell"
Title="#OrdersGridTitle">
<Columns Context="item">
<LgGridTextColumn @bind-Value="item.Number" Title="#OrderNumber" />
<LgGridTagBoxColumn @bind-Value="item.Tags"
Title="#Tags"
Placeholder="#TagsPlaceholder"
MaxTags="5"
MaxChars="30"
Delimiter=";"
AllowDuplicates="false"
NoWrap="true" />
</Columns>
</LgGridView>

ConfirmKeys allows you to replace the default validation keys (Enter, ;, ,) if your business input uses another separator.

Filter​

Text / tag list filter.

Associated enumerations​

The enumerations inherited from LgGridView used in the examples (GridEditMode) are documented in LgGridView.

Complete reference

Sheet generated from sources: API Reference — LgGridTagBoxColumn.