Skip to content

DeleteSelectedRow - cCJGrid

Attempts to delete the SelectedRow

Type: Function
Return Data Type: Boolean

Syntax

Function DeleteSelectedRow Returns Boolean

Call Example

Get DeleteSelectedRow to BooleanVariable

Description

DeleteSelectedRow attempts to delete the SelectedRow. DeleteSelectedRow does full validations and verifications before performing the delete. It returns True if the delete was canceled. If the delete was successful, it removes the row from the grid, the datasource and possibly an external source source such as a database. The row below, if it exists, will be the new SelectedRow, else the row above will become the SelectedRow.

DeleteSelectedRow does the following:

  1. It calls ForceColumnExit to force a column exit event
  2. It calls CanDeleteRow to see if the row can be deleted
  3. It calls Verify_Delete, which provides a hook for a user verification.
  4. It calls DeleteSelectedRow in the datasource object. This deletes the row according to the rules of the datasource
  5. It removes the row and selects a new row.

Normally you should use Request_Delete to delete the row. By default, the Shift+F2 key is bound to the Request_Delete message. Request_Delete calls DeleteSelectedRow.

Return Value

Returns True if the delete was canceled.