Aask
  • Aask
  • Newbie Topic Starter
2019-01-12T23:08:51Z
The method LoadFromArray appears to set the cell type in accordance with the value type of the element of the array that it loads.

The InputValidationError event passes lConvErr (a integer error code) and sErrDescr (a string containing the error description) to the event handler. That is, it does not pass the value of the cell before the change.

How does the error handler:

1. reset the cell value to what it was or undo the change?
2. NOT display an error message (choosing instead to change the background colour of the cell)?
Igor/10Tec
2019-01-15T16:03:55Z
It's not clear what you want to do. Can you describe your problem in details?

The purpose of the LoadFromArray method is to populate iGrid cells with the values from the specified array AS QUICK AS POSSIBLE. Generally this method is used to speed up code execution when you need to set values for a range of cells. In this case the method works much faster compared to an equivalent loop in which you call the CellValue property.

To provide the best performance, iGrid does not coerce a value from the array to the type of the corresponding cell value if it was specified before. Array values are simply copied to iGrid "as is". And sure, the logic that checks the entered value is not used in this case too.