Unbound Mode > Unbound Mode Events > Handling the UnboundDeleteRow event in modes 1 and 2 |
This event applies to both DataMode 1 - Unbound and 2 - Unbound Extended.
If the AllowDelete property of the grid is True, then users can delete rows from the grid, and you must implement the UnboundDeleteRow event. The syntax of this event is as follows:
Example Title |
Copy Code
|
---|---|
Private Sub TDBGrid1_UnboundDeleteRow(Bookmark As Variant) |
This is the simplest of all the unbound grid events. When fired, the Bookmark argument specifies the row being deleted. If the deletion fails, you should set the Bookmark argument to Null before returning from the event. Note that following execution of the UnboundDeleteRow event, the grid is automatically refreshed.