Deletes the current row.

Syntax

<oRef>.delete( )

<oRef>

The rowset whose current row you want to delete.

Property of

Rowset

Description

delete( ) deletes the current row in the rowset. When delete( ) is called, the canDelete event is fired. If there is no canDelete event handler, or the event handler returns true, the current row is deleted, the onDelete event fires, and the row cursor moves to the next row, or to the end-of-set if the last row was the one deleted. This movement is not considered navigation, so the rowset’s onNavigate does not fire. If you have an onNavigate event handler, call it from the onDelete event.

While the DBF (dBASE) table format supports soft deletes, in which the rows are only marked as deleted and not actually removed until the table is packed, there is no method in the data access classes to recall those records. Therefore a delete( ) should always be considered final.

The example attached to this topic shows how to use delete( ), in conjunction with the setRange( ) method, to delete all rows in a range or filter.