The colpreupdate event occurs before a value in a column is updated. You can use this event to change the new value before it is actually set.
Pass in a function and use properties of the options parameter. The following properties are exposed:
This example tacitly sets a new age value to 18 if the value that the user attempts to update this column to is lower than 18:
If the context of your code is such that the updated column is known to be the AGE column, you can abbreviate to:
This example replaces any empty values by the value "Unknown":