Occurs when a field in a DataWindow control has been modified and loses focus (for example, the user presses Enter, the Tab key, or an arrow key or clicks the mouse on another field within the DataWindow). It occurs before the change is applied to the item. ItemChanged can also occur when the AcceptText or Update function is called.
Argument |
Description |
---|---|
sender |
Object. The source of the event. |
row |
Number. The number of the row containing the item whose value is being changed. |
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) Accept the data value
1 Reject the data value and do not allow focus to change
2 Reject the data value but allow the focus to change
The ItemChanged event does not occur when the Web DataWindow client control itself loses focus. If the user clicks on an Update button, you will need to write a script that calls AcceptText to see if a changed value should be accepted before the button’s action occurs. For information on the right way to do this, see the description of AcceptText in the online Sybase DataWindow Help in Visual Studio.