Unsaved-row lock

GridControl

Stop users leaving a row with unsaved changes until they save it.

Overview

RowSelecting lets a Blazor GridControl refuse to move the selection, so users cannot leave a row they have edited but not saved. Use it on order or booking screens where each row is saved on its own: set Cancel on the event's RowSelectEventArgs and a click or arrow key that would move away is refused. This page marks a row as changed when OnCellSave writes a value and unlocks it on Save.

Examples

#Leave a row only after saving it

Edit a Qty, Price or Notes cell, then click another row or press Down: the move is refused and counted until you press Save.

Line Description Qty Unit price Notes
10Hotel, double room, per night7$142.00Late arrival, about 23:30
20Airport transfer, private car2$65.00Meet at arrivals, exit B
30Sintra day tour, small group2$89.00Vegetarian lunch for one
40Fado dinner show2$75.00Table near the stage
50Lisbon to Porto train, first class2$48.50Window seats requested
60Travel insurance, per traveler2$39.00Policy sent with the itinerary
6 rows

No unsaved changes.

Documentation

EventPayloadDescription
RowSelectingRowSelectEventArgs<TValue>Before a row is selected by mouse, keyboard or checkbox toggle. Set Cancel to refuse. Not raised by AutoSelectFirstRow, type-ahead moves or the selection methods.
RowSelectedRowSelectEventArgs<TValue>After a row is selected by mouse, keyboard, checkbox toggle, type-ahead search or AutoSelectFirstRow. Not raised during drag-select or by the selection methods.
RowDeselecting / RowDeselectedRowSelectEventArgs<TValue>Declared, but GridControl never raises them. TreeGridControl raises RowDeselected.
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.