Dela via


PropertyColumn<TGridItem,TProp> Class

Definition

Represents a QuickGrid<TGridItem> column whose cells display a single value.

public class PropertyColumn<TGridItem,TProp> : Microsoft.AspNetCore.Components.QuickGrid.ColumnBase<TGridItem>
type PropertyColumn<'GridItem, 'Prop> = class
    inherit ColumnBase<'GridItem>
Public Class PropertyColumn(Of TGridItem, TProp)
Inherits ColumnBase(Of TGridItem)

Type Parameters

TGridItem

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

TProp

The type of the value being displayed in the column's cells.

Inheritance
PropertyColumn<TGridItem,TProp>

Constructors

PropertyColumn<TGridItem,TProp>()

Properties

Align

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

(Inherited from ColumnBase<TGridItem>)
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.

(Inherited from ColumnBase<TGridItem>)
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>)).

(Inherited from ColumnBase<TGridItem>)
Format

Optionally specifies a format string for the value.

Using this requires the TProp type to implement IFormattable.

Grid

Gets a reference to the enclosing QuickGrid<TGridItem>.

(Inherited from ColumnBase<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.

(Inherited from ColumnBase<TGridItem>)
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.

(Inherited from ColumnBase<TGridItem>)
InitialSortDirection

Indicates which direction to sort in if IsDefaultSortColumn is true.

(Inherited from ColumnBase<TGridItem>)
IsDefaultSortColumn

Indicates whether this column should be sorted by default.

(Inherited from ColumnBase<TGridItem>)
PlaceholderTemplate

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

(Inherited from ColumnBase<TGridItem>)
Property

Defines the value to be displayed in this column's cells.

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).

(Inherited from ColumnBase<TGridItem>)
SortBy

Specifies sorting rules for a column.

Title

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

(Inherited from ColumnBase<TGridItem>)

Methods

BuildRenderTree(RenderTreeBuilder) (Inherited from ColumnBase<TGridItem>)
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.

(Inherited from ColumnBase<TGridItem>)
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.

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