ValidateCell

This event method triggers for each cell of the table. You can implement validation checks specific for a single cell.

Syntax

<Fieldn>_ValidateCell (pTable as ISCBCdrTable, pWorkdoc as ISCBCdrWorkdoc, Row as Long, Column as Long, pValid as Boolean)
Parameter Description
pTable The current table object.
pWorkdoc The current workdoc object.
Row The row of the table.
Column The column of the table.
pValid The current valid state of the table cell.

Sample Code

Private Sub MyTableField_ValidateCell(pTable as SCBCdrPROJLib.SCBCdrTable, pWorkdoc as SCBCdrPROJLib.SCBCdrWorkdoc, ByVal Row as Long, ByVal Column as Long, pValid as Boolean)
   Select Case Column
      Case 0:
      'check date in column 0
      if CheckDate(pTable.CellText(Column, Row)) = FALSE then
         pValid = FALSE
         pTable. CellValidationErrorDescription(Column, Row) = "Invalid date"
      end if
      Case 2:
      'check order number in column 2
      if CheckOrderNumber(pTable.CellText(Column, Row)) = FALSE then
         pValid = FALSE
         pTable. CellValidationErrorDescription(Column, Row) = "Invalid order number"
      end if
   End Select
End Sub