Skip to content

CanDeleteRow - cCJGridDataSource

Returns True if the datasource object supports deleting/removing rows

Type: Function
Return Data Type: Boolean

Syntax

Function CanDeleteRow Returns Boolean

Call Example

Get CanDeleteRow to BooleanVariable

Description

Before a grid will attempt to delete a row, it checks to see if deleting rows is supported. It does this by sending the message CanDeleteRow to itself. The CanDeleteRow message in the grid class sends the message CanDeleteRow to its datasource object. This allows both the grid and the grid's datasource to determine if a row can be deleted.

cCJGrid / cCJGridDataSource

This always returns True.

cDbCJGrid / cDbCJGridDataSource

This returns True if the datasource's DataDictionary properties Read_Only_State is False and Can_Delete is True.

Normally, the ability to delete rows is managed at the grid level with CanDeleteRow, pbAllowDeleteRow, and pbReadOnly.

You will never send this message and you would only augment it if you were creating your own datasource class. Even then, you are not likely to use it.

Return Value

True if the datasource supports deleting rows.