Skip to content

ValidateSelectedRow - cCJGridDataSource

Validates all data in the selected row

Type: Function
Return Data Type: Handle

Syntax

Function ValidateSelectedRow Returns Handle

Call Example

Get ValidateSelectedRow to HandleVariable

Description

ValidateSelectedRow validates the SelectedRow. This message is sent by the cCJGrid object's ValidateRow method and is part of the grid row save process. If the function returns 0, the validation succeeded. If the function returns a positive number, it is a handle to the grid column object that failed validation. If the function returns -1, it indicates that the validation failure was not associated with a column,

cCJGrid / cCJGridDataSource

The datasource sends the cCJGridColumn.Validating message to each grid column object. If Validating returns non-zero, the handle of the column object is returned.

cDbCJGrid / cDbCJGridDataSource

The datasource sends the cCJGridColumn.Validating message to each grid column. If Validating returns non-zero, the handle of the column object is returned. If all grid columns validate property, it then sends Request_Validate to the DataDictionary object, allowing the DataDictionary to perform a validation. If validation fails here, it returns -1. Therefore, a complete DataDictionary validation is always performed.

You will never send this message and will probably never augment it. If you create a custom datasource class, this interface must be supported.

Return Value

0 if all data is valid. If one of the column objects fails validation, returns the object handle of that object. If a general validation failure occurs that is not associated with a column, returns -1.