This example demonstrates how to use editing validation in the DataViews grid.
Before starting editing, Spread.Views fires the editing event.
There are four states in the editing life cycle in a normal case. They include beforeStartEditing, startEditing, beforeEndEditing, and endEditing. If the user cancels editing, there are only three states, since beforeEndEditing and endEditing are replaced by cancelEditing.
These states offer the opportunity for users to do what they want.
This demo sets the validation on the Country and Amount columns during the beforeEndEditing and cancelEditing states.
If the committed value does not satisfy the validation, then editing is not stopped by setting args.cancel=true.