CodeCharge Studio

ErrorMessages Run-Time Property (ASP)

Applies to

EditableGrid Form

Type

array of strings

Access

read/write

Syntax

object.ErrorMessages(<index>) [=value]

Description

This property is used to collect error messages from all rows of the editable grid. The index of the ErrorMessages array corresponds to the row number in the editable grid (on the given page). Messages are inserted to the table while each row values are validated. If the validation is successful (all data is correct) - the property is empty, otherwise its content is used to display error messages above the rows that did not pass the validation.

Users may modify this array by either resetting existing messages or replacing the existing with custom ones. Either grid's Before Show or On Validate events can be used for this modification.

Examples

The following code replaces all specific validation error messages in the editable grid with plain "This line needs to be corrected".

Dim i
For i = 1 To UBound(OrderItems.ErrorMessages)
  If Not IsEmpty(OrderItems.ErrorMessages(i)) Then
    OrderItems.ErrorMessages(i) = "This line needs to be corrected"
  End If
Next

See also

Errors property
OnValidate event


On-line, printable versions and updates