Application Mode > Application Mode Events > Handling the ClassicWrite event in mode 3 |
If the AllowUpdate property of the grid is True, and the user has edited data in one or more cells of the current row, then moving to another row will trigger an update. The grid will then fire the ClassicWrite event once for each updated cell, which enables you to apply the changed value to the underlying data stored and maintained by your application. The syntax of this event is as follows:
Example Title |
Copy Code
|
---|---|
Private Sub TDBGrid1_ClassicWrite(Bookmark as Variant, _ ByVal Col as Integer, Value As Variant) |
Bookmark is a bookmark which specifies the row that needs to be updated.
Col is a value which specifies the column index of data that has been modified.
Value is the data that corresponds to the cell location identified by Bookmark and Col.
Before returning from this event, you must update the underlying data source with Value. If, for some reason, the update cannot be completed, you can set the Bookmark argument to Null in order to force the grid to maintain the previous value of the current cell.