TField OnValidate 事件
2011-06-29 13:12
211 查看
Occurs just before the data is written to the record buffer.
Write an OnValidate event handler to validate changes made to the data in the field, just before the data is written to the current record buffer. The EditMask property allows validation of the data on a character by character basis while it is being entered by the user. OnValidate allows an application to validate the data as a whole.
When the value of a field component is assigned programmatically, validation by the EditMask is bypassed, since there is no data-aware control to enforce adherence to the mask. OnValidate allows an application to validate such data before it is posted to the database table.
To reject the current value of the field from the OnValidate event handler, raise an exception.
When writing the value of a field to the current record buffer, the following steps occur:
1 The OnValidate event handler is called to validate the data.
2 If the OnValidate event handler does not raise an exception, the data is written to the current record buffer.
3 If writing the data does not raise an exception, the OnChange event handler is called to allow a response to the change.
Write an OnValidate event handler to validate changes made to the data in the field, just before the data is written to the current record buffer. The EditMask property allows validation of the data on a character by character basis while it is being entered by the user. OnValidate allows an application to validate the data as a whole.
When the value of a field component is assigned programmatically, validation by the EditMask is bypassed, since there is no data-aware control to enforce adherence to the mask. OnValidate allows an application to validate such data before it is posted to the database table.
To reject the current value of the field from the OnValidate event handler, raise an exception.
When writing the value of a field to the current record buffer, the following steps occur:
1 The OnValidate event handler is called to validate the data.
2 If the OnValidate event handler does not raise an exception, the data is written to the current record buffer.
3 If writing the data does not raise an exception, the OnChange event handler is called to allow a response to the change.
相关文章推荐
- asp.net HiddenField的OnValueChanged事件不被触发
- 【UGUI】无限循环列表和InputField.onValueChanged 事件
- jQuery 2.0.3 源码分析 事件绑定 - bind/live/delegate/on
- jQuery新的事件绑定机制on()示例应用
- F4 help functionality for a dynpro screen field using the PROCESS ON VALUE-REQUEST statement
- onbeforeunload与onunload事件
- ICommad中如何监听Map的onAfterDraw事件
- jQuery的on()方法的两种用法(委托给父元素进行事件监听代理)
- ajax之后on绑定事件,第一次ajax可以。第二次点击不行。on执行两次
- onbeforeunload与onunload事件
- MotionEvent事件在onInterceptTouchEvent()、onTouchEvent()中的传递顺序
- 页面、表单、滚动字幕等on事件汇总
- 点击textField,监听键盘事件实现页面上移
- onTouch,onClick,onLongClick事件触发分析
- onbeforeunload事件
- Windows Phone 7 Tip - 小心使用 OnNavigatedTo 事件
- Android事件传递之onInterceptTouchEvent()和requestDisallowInterceptTouchEvent()方法的使用
- 【Android View】Android中View对触摸事件的处理和传递dispatchTouchEvent、onInterceptTouchEvent
- 解决 html input file onchang 事件触发一次后失效问题
- jQuery事件绑定方法bind、 live、delegate和on的区别