Unbound Mode > Unbound Mode Programming Considerations > Refreshing the display in mode 1 |
In the original DBGrid, the Refresh and ReBind methods behaved differently in bound and unbound modes. For backward compatibility, these differences were preserved in True DBGrid when the DataMode property is set to 1 - Unbound.
When a grid Refresh occurs, the grid refetches and redisplays all data by firing the UnboundReadData event. After the refresh, the current cell is the first column of the first record, which is displayed at the upper left corner of the grid. Any changed data will be lost.
When a grid ReBind occurs, the grid refetches data by firing the UnboundReadData event, but it maintains any changed data within the current row. When redisplaying data, the grid attempts to preserve the same current cell and top row, if possible.