DeletedCount

Description

Reports the number of rows that have been marked for deletion in the database.

Applies to

Web DataWindow client control

Syntax

number objdwcontrol.DeletedCount ( )

Argument

Description

objdwcontrol

A reference to a Web DataWindow client control

Returns

Returns the number of rows that have been deleted from objdwcontrol but not updated in the associated database table.

Returns 0 if no rows have been deleted or if all the deleted rows have been updated in the database table. DeletedCount returns -1 if it fails.

Usage

An updatable WebDataWindowControl has several buffers. The primary buffer stores the rows currently being displayed. The delete buffer stores rows that the application has marked for deletion by calling the DeleteRow method. These rows are saved until the database is updated. You can use DeletedCount to find out if there are any rows in the delete buffer.

If a DataWindow is not updatable, rows that are deleted are discarded—they are not stored in the delete buffer. Therefore, DeletedCount returns 0 for a nonupdatable DataWindow unless a method, such as RowsCopy or RowsMove, has been used to populate the delete buffer.