码迷,mamicode.com
首页 > 其他好文 > 详细

TField OnValidate 事件

时间:2019-03-22 18:29:58      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:enter   follow   ica   OLE   事件   tab   character   sse   char   

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.

TField OnValidate 事件

标签:enter   follow   ica   OLE   事件   tab   character   sse   char   

原文地址:https://www.cnblogs.com/jijm123/p/10579896.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!