Table of Contents

Class TwDataTableCellEditContext<TItem>

Namespace
TwBlazor.Components
Assembly
TwBlazor.dll

The cell being edited, the context of EditTemplate. Render an editor that shows Value, calls SetValue(object?) when it changes, and uses Id, Label and ErrorMessage so it can be focused, is named and reports problems.

public sealed class TwDataTableCellEditContext<TItem>

Type Parameters

TItem

The type of items displayed in the table.

Inheritance
TwDataTableCellEditContext<TItem>
Inherited Members

Properties

Column

Gets the column being edited.

public TwDataTableColumn<TItem> Column { get; }

Property Value

TwDataTableColumn<TItem>

ErrorMessage

Gets the message from the column's Validator, or null when the value is fine.

public string? ErrorMessage { get; }

Property Value

string

Id

Gets the id to give the editor's input, so the table can focus it when editing starts or the value needs fixing.

public string Id { get; }

Property Value

string

Invalid

Gets whether the value needs fixing before the row can be saved.

public bool Invalid { get; }

Property Value

bool

Item

Gets the row being edited, unchanged until the edit is saved.

public TItem Item { get; }

Property Value

TItem

Label

Gets the accessible name for the editor: the column's title.

public string Label { get; }

Property Value

string

Value

Gets the value the editor should show.

public object? Value { get; }

Property Value

object

Methods

SetValue(object?)

Records a new value for the cell. It is written to the row when the edit is saved.

public void SetValue(object? value)

Parameters

value object

The new value.