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
TItemThe 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
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
Invalid
Gets whether the value needs fixing before the row can be saved.
public bool Invalid { get; }
Property Value
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
Value
Gets the value the editor should show.
public object? Value { get; }
Property Value
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
valueobjectThe new value.