Unsaved-row lock
GridControlStop 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 |
|---|---|---|---|---|
| 10 | Hotel, double room, per night | 7 | $142.00 | Late arrival, about 23:30 |
| 20 | Airport transfer, private car | 2 | $65.00 | Meet at arrivals, exit B |
| 30 | Sintra day tour, small group | 2 | $89.00 | Vegetarian lunch for one |
| 40 | Fado dinner show | 2 | $75.00 | Table near the stage |
| 50 | Lisbon to Porto train, first class | 2 | $48.50 | Window seats requested |
| 60 | Travel insurance, per traveler | 2 | $39.00 | Policy sent with the itinerary |
No unsaved changes.