Occurs when a field has been modified, the field loses focus (for example, the user presses Enter, Tab, or an arrow key or clicks the mouse on another field in the DataWindow), and the data in the field does not pass the validation rules for its column.
Argument |
Description |
---|---|
sender |
Object. The source of the event. |
row |
Number. The number of the row containing the item whose new value has failed validation. |
columnName |
String. The name of the column containing the item. |
newValue |
String. The new data the user has specified for the item. |
Web DataWindow client control
Set the return code to affect the outcome of the event:
0 (Default) Reject the data value and show an error message box
1 Reject the data value with no message box
2 Accept the data value
3 Reject the data value but allow focus to change
If the Return code is 0 or 1 (rejecting the data), the field with the incorrect data regains the focus.
The ItemError event occurs instead of the ItemChanged event when the new data value fails a validation rule. You can force the ItemError event to occur by rejecting the value in the ItemChanged event.
This script in the .aspx file displays an alert message:
function objwdw_ItemError(sender, rowNumber, columnName, newValue) { alert("ItemError: " + rowNumber + columnName + newValue); }