GridColumnTModel, TProperty Class

Represents a column in the GridTItem.

Definition

Namespace: BlazorBootstrap
Assembly: BlazorBootstrap (in BlazorBootstrap.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public sealed class GridColumn<TModel, TProperty> : BlazorBootstrapComponentBase, 
	IGridColumn<TModel>
where TModel : class
Inheritance
Object    ComponentBase    BlazorBootstrapComponentBase    GridColumnTModel, TProperty
Implements
IGridColumnTModel

Type Parameters

TModel
Data model to apply to the column of the grid
TProperty
Property type derived from TModel

Remarks

The Accessormust be set to the property (of type TProperty) of the model TModel. If the Accessor is not a MemberExpression, Exceptions will be invoked when filtering takes place!

Constructors

GridColumnTModel, TPropertyInitializes a new instance of the GridColumnTModel, TProperty class

Properties

Accessor Accessor to the property of the model.
ChildContent Specifies the content to be rendered inside the grid column.
CurrentSortDirection The sort direction of the column, which can be altered by the user.
DefaultSortDirection The default sort direction (as set by SortDirection)
Filterable If , filter is enabled. The filter is enabled or disabled based on the grid `AllowFiltering` parameter.
FilterOperator Gets or sets the filter operator.
FilterValue Gets or sets the filter value.
FilterValueUntil Second value (only relevant if FilterOperator is Range)
HeaderText Gets or sets the table column header text.
IsDefaultSortColumn Gets or sets the default sort column.
Parent The GridTItem this column is a part of.
ParsedValue The current column's value (in its property type value)
ParsedValueUntil The current column's until value for Range operations. (in its property type value)
PropertyAccessor The accessor of the property as a LambdaExpression, so the GridTItem can use it.
Sortable Enable or disable the sorting on a specific column. The sorting is enabled or disabled based on the PropertyAccessor parameter on the grid.
SortDirection Gets or sets the default sort direction of a column.

Methods

GetPropertyType Returns the property type of the current column.
GetSorting Returns the SortKeySelector and CurrentSortDirection to apply, or an empty list if no sorting is available.
OnEnumFilterValueChangedAsync Invoked if the filter value changes (If the property type is an Enum)
OnFilterOperatorChangedAsync Invoked when the filter operator is changed, either by the user or programmatically.
OnFilterUntilValueChangedAsync Invoked when the "until" value has changed, only relevant if the FilterOperator is Range
OnFilterValueChangedAsync Invoked when the filter value has changed, either by the user or programmatically.
OnSortClickAsync Invoked when the user clicks on the column header to sort.
SetParametersAsync Parameters are loaded manually for sake of performance. https://learn.microsoft.com/en-us/aspnet/core/blazor/performance#implement-setparametersasync-manually
(Overrides ComponentBaseSetParametersAsync(ParameterView))

See Also