Class Column<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Represents a vertical set of values.
public abstract class Column<T> : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IDisposable
Type Parameters
T
The kind of item for this column.
- Inheritance
-
Column<T>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Column()
protected Column()
Properties
AggregateDefinition
The function which calculates aggregates for this column.
[Parameter]
public AggregateDefinition<T> AggregateDefinition { get; set; }
Property Value
AggregateTemplate
The template used to display this column's aggregate.
[Parameter]
public RenderFragment<IEnumerable<T>> AggregateTemplate { get; set; }
Property Value
CellClass
The CSS classes to apply to the cell.
[Parameter]
public string CellClass { get; set; }
Property Value
Remarks
Multiple classes must be separated by spaces.
CellClassFunc
The function used to determine CSS classes for this cell.
[Parameter]
public Func<T, string> CellClassFunc { get; set; }
Property Value
Remarks
Multiple classes must be separated by spaces.
CellStyle
The CSS styles to apply to this cell.
[Parameter]
public string CellStyle { get; set; }
Property Value
CellStyleFunc
The function which calculates CSS styles for this cell.
[Parameter]
public Func<T, string> CellStyleFunc { get; set; }
Property Value
CellTemplate
The template used to display this column's value cells.
[Parameter]
public RenderFragment<CellContext<T>> CellTemplate { get; set; }
Property Value
Comparer
The comparison used for values in this column.
[Parameter]
public IComparer<object> Comparer { get; set; }
Property Value
ContentFormat
protected virtual string? ContentFormat { get; }
Property Value
Culture
The culture used to parse, filter, and display values in this column.
[Parameter]
[Category("Appearance")]
public CultureInfo Culture { get; set; }
Property Value
Remarks
Defaults to Culture.
DataGrid
The data grid which owns this column.
[CascadingParameter]
public MudDataGrid<T> DataGrid { get; set; }
Property Value
- MudDataGrid<T>
DragAndDropEnabled
Allows this column to be reordered via drag-and-drop operations.
[Parameter]
public virtual bool? DragAndDropEnabled { get; set; }
Property Value
- bool?
Remarks
Defaults to null
. When set, this overrides the DragDropColumnReordering property.
EditTemplate
The template for editing values in this cell.
[Parameter]
public RenderFragment<CellContext<T>> EditTemplate { get; set; }
Property Value
Editable
Allows editing for this cell.
[Parameter]
public bool Editable { get; set; }
Property Value
Remarks
Defaults to true
.
EnableFooterSelection
Allows the footer to be selected.
[Parameter]
public bool EnableFooterSelection { get; set; }
Property Value
FilterContext
The context used for filtering values in this column.
public FilterContext<T> FilterContext { get; }
Property Value
FilterOperators
The operators to use for this column's filter.
[Parameter]
public HashSet<string> FilterOperators { get; set; }
Property Value
FilterTemplate
The template used to display this column's filter.
[Parameter]
public RenderFragment<FilterContext<T>> FilterTemplate { get; set; }
Property Value
Filterable
Allows filters to be used on this column.
[Parameter]
public virtual bool? Filterable { get; set; }
Property Value
- bool?
Remarks
Defaults to null
. When set, this overrides the Filterable property.
FooterClass
The CSS classes applied to this column's footer.
[Parameter]
public string FooterClass { get; set; }
Property Value
Remarks
Multiple classes must be separated by spaces.
FooterClassFunc
The function which calculates CSS classes for this column's footer.
[Parameter]
public Func<IEnumerable<T>, string> FooterClassFunc { get; set; }
Property Value
- Func<IEnumerable<T>, string>
Remarks
Multiple classes must be separated by spaces.
FooterColSpan
The number of columns spanned by this column in the footer.
[Parameter]
public int FooterColSpan { get; set; }
Property Value
Remarks
Defaults to 1
.
FooterStyle
The CSS styles to apply to this column's footer.
[Parameter]
public string FooterStyle { get; set; }
Property Value
FooterStyleFunc
The function which calculates CSS styles for this column's footer.
[Parameter]
public Func<IEnumerable<T>, string> FooterStyleFunc { get; set; }
Property Value
- Func<IEnumerable<T>, string>
FooterTemplate
The template used to display this column's footer.
[Parameter]
public RenderFragment<FooterContext<T>> FooterTemplate { get; set; }
Property Value
GroupBy
The function which groups values in this column.
[Parameter]
public Func<T, object> GroupBy { get; set; }
Property Value
GroupTemplate
The template used to display this column's grouping.
[Parameter]
public RenderFragment<GroupDefinition<T>> GroupTemplate { get; set; }
Property Value
Groupable
Allows values in this column to be grouped.
[Parameter]
public bool? Groupable { get; set; }
Property Value
- bool?
Remarks
Defaults to null
. When set, this overrides the Groupable property.
Grouping
Indicates whether this column is currently grouped.
[Parameter]
public bool Grouping { get; set; }
Property Value
GroupingChanged
Occurs when the Grouping property has changed.
[Parameter]
public EventCallback<bool> GroupingChanged { get; set; }
Property Value
HeaderClass
The CSS class applied to the header.
[Parameter]
public string HeaderClass { get; set; }
Property Value
Remarks
Defaults to null
. Separate multiple classes with spaces.
HeaderClassFunc
The function which calculates CSS classes for the header.
[Parameter]
public Func<IEnumerable<T>, string> HeaderClassFunc { get; set; }
Property Value
- Func<IEnumerable<T>, string>
Remarks
Defaults to null
. Separate multiple classes with spaces.
HeaderColSpan
The number of columns spanned by this column in the header.
[Parameter]
public int HeaderColSpan { get; set; }
Property Value
Remarks
Defaults to 1
.
HeaderStyle
The CSS style applied to this column's header.
[Parameter]
public string HeaderStyle { get; set; }
Property Value
HeaderStyleFunc
The function which calculates CSS styles for the header.
[Parameter]
public Func<IEnumerable<T>, string> HeaderStyleFunc { get; set; }
Property Value
- Func<IEnumerable<T>, string>
HeaderTemplate
The template used to display this column's header.
[Parameter]
public RenderFragment<HeaderContext<T>> HeaderTemplate { get; set; }
Property Value
Hidden
Hides this column.
[Parameter]
public bool Hidden { get; set; }
Property Value
Remarks
Defaults to false
.
HiddenChanged
Occurs when the Hidden property has changed.
[Parameter]
public EventCallback<bool> HiddenChanged { get; set; }
Property Value
HideSmall
Hides this column.
[Parameter]
public bool HideSmall { get; set; }
Property Value
Remarks
Defaults to false
.
Hideable
Allows this column to be hidden.
[Parameter]
public bool? Hideable { get; set; }
Property Value
- bool?
Remarks
Defaults to null
. When set, this overrides the Hideable property.
Identifier
The unique identifier for this column.
public string Identifier { get; set; }
Property Value
InitialDirection
The sorting direction applied when Sortable is true
.
[Parameter]
public SortDirection InitialDirection { get; set; }
Property Value
Remarks
Defaults to None.
PropertyExpression
protected virtual LambdaExpression? PropertyExpression { get; }
Property Value
PropertyName
The name of the property used for sorting this column's values.
public virtual string PropertyName { get; }
Property Value
PropertyType
protected virtual Type PropertyType { get; }
Property Value
Required
Requires a value to be set.
[Parameter]
public bool Required { get; set; }
Property Value
Remarks
Defaults to true
.
Resizable
Allows this column's width to be changed.
[Parameter]
public virtual bool? Resizable { get; set; }
Property Value
- bool?
ShowColumnOptions
Shows options for this column.
[Parameter]
public virtual bool? ShowColumnOptions { get; set; }
Property Value
- bool?
Remarks
Defaults to null
. When set, this overrides the ShowColumnOptions property.
ShowFilterIcon
Shows the filter icon.
[Parameter]
public bool? ShowFilterIcon { get; set; }
Property Value
- bool?
Remarks
Defaults to null
. When set, this overrides the ShowFilterIcons property.
SortBy
The function used to sort values in this column.
[Parameter]
public Func<T, object> SortBy { get; set; }
Property Value
SortIcon
The icon shown when Sortable is true
.
[Parameter]
public string SortIcon { get; set; }
Property Value
Sortable
Sorts values in this column.
[Parameter]
public virtual bool? Sortable { get; set; }
Property Value
- bool?
Remarks
Defaults to null
. When set, this overrides the SortMode property.
StickyLeft
Fixes this column to the left side.
[Parameter]
public bool StickyLeft { get; set; }
Property Value
Remarks
When true
, this column will be visible even as the container is scrolled horizontally.
StickyRight
Fixes this column to the right side.
[Parameter]
public bool StickyRight { get; set; }
Property Value
Remarks
When true
, this column will be visible even as the container is scrolled horizontally.
Title
The display text for this column.
[Parameter]
public string Title { get; set; }
Property Value
Value
The value stored in this column.
[Parameter]
public T Value { get; set; }
Property Value
- T
ValueChanged
Occurs when the Value has changed.
[Parameter]
public EventCallback<T> ValueChanged { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
CellContent(T)
protected abstract object CellContent(T item)
Parameters
item
T
Returns
Dispose()
Releases resources used by this column.
public virtual void Dispose()
GetFilterExpression()
protected virtual Func<T, bool> GetFilterExpression()
Returns
HideAsync()
Hides this column.
public Task HideAsync()
Returns
OnInitialized()
protected override void OnInitialized()
PropertyFunc(T)
protected abstract object PropertyFunc(T item)
Parameters
item
T
Returns
SetProperty(object, object)
protected abstract void SetProperty(object item, object value)
Parameters
ShowAsync()
Shows this column.
public Task ShowAsync()
Returns
ToggleAsync()
Hides or shows this column.
public Task ToggleAsync()