Unsaved-row lock
GridControlVeto the move to another row while the current one has unsaved changes.
Overview
RowSelecting fires before the selection moves. Its RowSelectEventArgs carries the target row in
Data and a Cancel flag; set it and the move is refused, whether it came from a click or from the
keyboard. This page marks a row dirty when a cell value is written (OnCellSave) and refuses every move
away from it until Save is pressed; moves within the dirty row are still allowed.
Examples
#Leave a row only after saving it
Double-click a Qty, Price or Notes cell, change it and press Enter. Now click another row, or press the Down arrow: the other row does not become selected and the line under the grid counts the refusal. Press Save and the lock lifts.
| Line | Description | Qty | Unit price | Notes |
|---|---|---|---|---|
| 10 | Ready-mix concrete 4000 psi | 24 | $142.00 | Pump truck on site 6:30 |
| 20 | #4 rebar, 20 ft | 180 | $11.25 | Tie wire included |
| 30 | 2x6 studs, 92 5/8 in | 450 | $8.75 | Deliver to lot 14 |
| 40 | Architectural shingles, 30 yr | 65 | $34.50 | Match sample board |
| 50 | PEX supply pipe, 3/4 in | 12 | $145.00 | Red and blue coils |
| 60 | 200 A main panel | 2 | $680.00 | Inspection before cover |
No unsaved changes.
Documentation
RowSelecting / RowSelected, RowSelectEventArgs, OnCellSave and SelectionSettings are still to be written up from Grid/GridControlEvents.cs and Grid/GridModels.cs.