Coding the ItemError event

The ItemError event is triggered if there is a problem with the data. By default, it rejects the data value and displays a message box. You can write code for the ItemError event to do some other processing. For example, you can accept the data value, or reject the data value but allow focus to change:

e.Action = ItemErrorAction.RejectAndAllowFocusChange

For more information about coding events, see “Handling events”.