Share via


ColumnBase<TGridItem> Class

Definition

An abstract base class for columns in a QuickGrid<TGridItem>.

public abstract class ColumnBase<TGridItem> : Microsoft.AspNetCore.Components.ComponentBase
type ColumnBase<'GridItem> = class
    inherit ComponentBase
Public MustInherit Class ColumnBase(Of TGridItem)
Inherits ComponentBase

Type Parameters

TGridItem

The type of data represented by each row in the grid.

Inheritance
ColumnBase<TGridItem>
Derived

Constructors

ColumnBase<TGridItem>()

Constructs an instance of ColumnBase<TGridItem>.

Properties

Align

If specified, controls the justification of table header and body cells for this column.

Assets

Gets the ResourceAssetCollection for the application.

(Inherited from ComponentBase)
AssignedRenderMode

Gets the IComponentRenderMode assigned to this component.

(Inherited from ComponentBase)
Class

An optional CSS class name. If specified, this is included in the class attribute of table header and body cells for this column.

ColumnOptions

If specified, indicates that this column has this associated options UI. A button to display this UI will be included in the header cell by default.

If HeaderTemplate is used, it is left up to that template to render any relevant "show options" UI and invoke the grid's ShowColumnOptionsAsync(ColumnBase<TGridItem>)).

Grid

Gets a reference to the enclosing QuickGrid<TGridItem>.

HeaderContent

Gets or sets a RenderFragment that will be rendered for this column's header cell. This allows derived components to change the header output. However, derived components are then responsible for using HeaderTemplate within that new output if they want to continue respecting that option.

HeaderTemplate

An optional template for this column's header cell. If not specified, the default header template includes the Title along with any applicable sort indicators and options buttons.

InitialSortDirection

Indicates which direction to sort in if IsDefaultSortColumn is true.

IsDefaultSortColumn

Indicates whether this column should be sorted by default.

PlaceholderTemplate

If specified, virtualized grids will use this template to render cells whose data has not yet been loaded.

RendererInfo

Gets the RendererInfo the component is running on.

(Inherited from ComponentBase)
Sortable

Indicates whether the data should be sortable by this column.

The default value may vary according to the column type (for example, a TemplateColumn<TGridItem> is sortable by default if any SortBy parameter is specified).

SortBy

Specifies sorting rules for a column.

Title

Title text for the column. This is rendered automatically if HeaderTemplate is not used.

Methods

BuildRenderTree(RenderTreeBuilder)
CellContent(RenderTreeBuilder, TGridItem)

Overridden by derived components to provide rendering logic for the column's cells.

DispatchExceptionAsync(Exception)

Treats the supplied exception as being thrown by this component. This will cause the enclosing ErrorBoundary to transition into a failed state. If there is no enclosing ErrorBoundary, it will be regarded as an exception from the enclosing renderer.

This is useful if an exception occurs outside the component lifecycle methods, but you wish to treat it the same as an exception from a component lifecycle method.

(Inherited from ComponentBase)
InvokeAsync(Action)

Executes the supplied work item on the associated renderer's synchronization context.

(Inherited from ComponentBase)
InvokeAsync(Func<Task>)

Executes the supplied work item on the associated renderer's synchronization context.

(Inherited from ComponentBase)
IsSortableByDefault()

Get a value indicating whether this column should act as sortable if no value was set for the Sortable parameter. The default behavior is not to be sortable unless Sortable is true.

Derived components may override this to implement alternative default sortability rules.

OnAfterRender(Boolean)

Method invoked after each time the component has rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any ElementReference fields will be populated by the time this runs.

This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.

(Inherited from ComponentBase)
OnAfterRenderAsync(Boolean)

Method invoked after each time the component has been rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any ElementReference fields will be populated by the time this runs.

This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.

Note that the component does not automatically re-render after the completion of any returned Task, because that would cause an infinite render loop.

(Inherited from ComponentBase)
OnInitialized()

Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

(Inherited from ComponentBase)
OnInitializedAsync()

Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.

(Inherited from ComponentBase)
OnParametersSet()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

(Inherited from ComponentBase)
OnParametersSetAsync()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

(Inherited from ComponentBase)
SetParametersAsync(ParameterView)

Sets parameters supplied by the component's parent in the render tree.

(Inherited from ComponentBase)
ShouldRender()

Returns a flag to indicate whether the component should render.

(Inherited from ComponentBase)
StateHasChanged()

Notifies the component that its state has changed. When applicable, this will cause the component to be re-rendered.

(Inherited from ComponentBase)

Explicit Interface Implementations

IComponent.Attach(RenderHandle) (Inherited from ComponentBase)
IHandleAfterRender.OnAfterRenderAsync() (Inherited from ComponentBase)
IHandleEvent.HandleEventAsync(EventCallbackWorkItem, Object) (Inherited from ComponentBase)

Applies to