Skip to content

Verify_Save - cCJGrid

Sent before a row save allowing the save process to be cancelled

Type: Function
Return Data Type: Integer

Syntax

Function Verify_Save Returns Integer

Call Example

Get Verify_Save to IntegerVariable

Description

Verify_Save can be augmented to provide a row save confirmation to your user. It is called by SaveSelectedRow as part of the row save process. If it returns non-zero, the save will be cancelled.

In a cCJGrid, the function returns zero. You can add your own confirmation message as follows:

Function Verify_Save Returns Integer
    Integer iCancel
    Get Confirm "Save this row" to iCancel
    Function_Return iCancel
End_Function

In the cDbCJGrid class, this adheres to the DEO interface, where it expects that the Verify_Save_msg property will contain the verification message Id. If this Id is non-zero, it will send this message. By default, the cDbCJGrid class sets Verify_Save_msg to No_Save_Confirmation, which means that no save confirmation appears. You could change this to display a confirmation message as follows:

Set Verify_Save_msg to (RefFunc(Line_Save_Confirmation))

Note that setting Verify_Save_Msg to 0 will cause it delegate, which might find a different save confirmation in a parent DEO. Setting this to No_Confirmation makes sure that there is no verification message.

See Also

Verify_Delete | Verify_Data_Loss

Return Value

Returns non-zero if the row save should be cancelled.