TcxCustomDataController.ErrorCodes Property
Returns an expression error code by the specified record and item indexes.
Declaration
property ErrorCodes[ARecordIndex: Integer; AItemIndex: Integer]: Integer read;
Property Value
Type |
---|
Integer |
Remarks
Use this property to identify which error status an individual expression’s result has. Different cells within the same data item can have a different error status depending on data in different rows. Use the AItemIndex and ARecordIndex parameters to specify the target data item and a cell within it. The ErrorCodes property returns 0 if there is no calculation error in the target cell or the specified data item has no active expression (that is, the IsItemExpression function returns False for AItemIndex). Otherwise, the property returns a positive code that corresponds to the occurred calculation error:
Error Code | TdxSpreadSheetFormulaErrorCode Value | Description |
---|---|---|
0 | ecNone | The target data cell does not belong to a calculated field or contains no calculation error. |
1 | ecNull | The error corresponds to the #NULL! error type in Microsoft Excel®. This error can occur when a function within an expression has an incorrectly specified parameter. Refer to individual function descriptions for details. |
2 | ecDivByZero | The error corresponds to the #DIV/0! error type in Microsoft Excel®. This error occurs if an expression contains a division by zero. |
3 | ecValue | The error corresponds to the #VALUE! error type in Microsoft Excel®. This error can occur when a function within an expression has an incorrectly specified parameter type. Refer to individual function descriptions for details. |
4 | ecRefErr | The error corresponds to the #REF! error type in Microsoft Excel®. This error occurs when an expression contains an incorrect reference to a data field. |
5 | ecName | The error corresponds to the #NAME? error type in Microsoft Excel®. This error occurs when an expression contains an unregistered function name. |
6 | ecNUM | The error corresponds to the #NUM! error type in Microsoft Excel®. This error can occur if a function within an expression accepts a parameter value that is outside the valid range. Refer to individual function descriptions for details. |
7 | ecNA | The error corresponds to the #N/A error type in Microsoft Excel®. This error can occur if a function cannot return a result due to one or more incorrect parameters. Refer to individual function descriptions for details. |
See Also