Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Editing

Since 0.1.0-alpha.24
Rows are edited as in a DataGrid, an action adds a row under another, and Move puts a row under a new parent.

The members for editing, and the types they use. Every member of IzzyBlazor.TreeList<TItem> is on the TreeList API.

Properties (7)

NewChildFunc<TItem, TItem>?Added in 0.1.0-alpha.24

A new row's starting values under the row given, such as its parent's id set. Setting it lets an AddChildAction add rows under others; OnSave gets the row with IsNew set. NewItem still adds top rows, from the toolbar.

ItemMovableFunc<TItem, bool>?Added in 0.1.0-alpha.24

Which rows can be moved; all of them when it's not set. It's checked on a move too, not just when drawing the action.

MoveByDragbool = falseAdded in 0.1.0-alpha.24

Gives each row a handle to drag it before, after or into another row, never into its own branch. Needs OnReparent, which gets the row's new parent and place. A drop moves the row at once, on a static page by a form post. Pressed, or from the keyboard, the handle opens the Move dialog, as a MoveAction does, and so does a drop OnReparent turns down, with its reason.

EditModeDataGridEditMode = DataGridEditMode.NoneAdded in 0.1.0-alpha.24

How a row is edited. Needs OnSave and an ItemKey.

NewItemFunc<TItem>?Added in 0.1.0-alpha.24

A new row's starting values. Setting it adds an Add button to the toolbar, and OnSave gets the row with IsNew set.

ItemEditableFunc<TItem, bool>?Added in 0.1.0-alpha.24

Which rows can be edited; all of them when it's not set. It's checked on a save too, not just when drawing the button.

ItemDeletableFunc<TItem, bool>?Added in 0.1.0-alpha.24

Which rows can be deleted; all of them when it's not set. It's checked on a delete too, not just when drawing the button.

Events (3)

OnReparentEventCallback<TreeListMove<TItem>>Added in 0.1.0-alpha.24

Saves a row moved under another, or to the top level, from a MoveAction's dialog. With no error added, the dialog closes and the rows load again. Needs Items.

OnSaveEventCallback<DataGridSave<TItem>>Added in 0.1.0-alpha.24

Saves an edited row. With no errors added, the editor closes and the rows load again; with errors, it stays open and shows them. It's called only when the row is valid by its rules.

OnDeleteEventCallback<DataGridDelete<TItem>>Added in 0.1.0-alpha.24

Deletes a row, once someone has confirmed it. Setting it adds a Delete action to each row. With no error added, the dialog closes and the rows load again.

Types (4)

DataGridDelete

class

A delete from a DataGrid, for its OnDelete. With no error added, the dialog closes and the rows load again.

DataGridDelete members
MemberDescription
Item TItem

The row to delete.

AddError(string message)

Reports why it can't be deleted, shown in the dialog, which stays open.

DataGridEditMode

enum

How a DataGrid edits a row.

DataGridEditMode values
ValueDescription
None

It doesn't. The default.

Dialog

In a dialog, with a field for each editable column.

Row

In the row, with a field in each editable column that's shown. A new row starts at the top of the page. Not with rows that load as they're needed, which could scroll it away.

Cell

One cell at a time, on an interactive page: a click, Enter, F2 or typing starts it, and Tab, Enter or a click elsewhere saves it. OnSave runs for each cell that changed. A new row is edited as in DataGridEditMode.Row, and so is every row on a static page, where a round trip for each cell would make moving through them unusable.

DataGridSave

class

A save from a DataGrid, for its OnSave. With no errors added, the editor closes and the rows load again. With errors, it stays open and shows them.

DataGridSave members
MemberDescription
Item TItem

The row with its new values: a copy, and valid by its rules. Only editable columns have changed.

Original TItem

The row as it was loaded, or the default for a new one.

IsNew bool

Whether it's a new row, from NewItem.

AddError<TValue>(Expression<Func<TItem, TValue>> field, string message)

Reports a problem with the save as a whole, shown at the top of the editor.

AddError(string message)

Reports a problem with the save as a whole, shown at the top of the editor.

CopyTo(TItem target)

Copies the editable columns' new values to target, such as an entity just read from the database, and leaves the rest of it alone.

TreeListMove

class

A row of a TreeList<T> moved under another, or to the top level, for its OnReparent to save: set the row's parent and its place among its new siblings. With an error added, the move doesn't happen and the dialog stays open with the message.

TreeListMove members
MemberDescription
Item TItem

The row moved.

Parent TItem

The row it goes under, or default for the top level.

Index int

Where it goes among its new siblings, from 0: after them all, from the Move dialog.

HasErrors bool

Whether an error was added, which stops the move.

AddError(string message)

Stops the move and says why, in the dialog.

Connection lost

Rejoining the server…