TField OnValidate 事件
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 事件的更多相关文章
- delphi中adoquery控件中某个字段Onvalidate事件的用法?
procedure TForm2.ADOQuery1TestFieldValidate(Sender: TField);begin// Sender就是当前字段,可以在这里对Sender字段进行各种操 ...
- TkbmMWClientQuery的计算字段在CalcFields事件触发次数太多
kbmmw有两处BUG和作者提下,一个是TkbmMWClientQuery的计算字段在CalcFields事件触发次数太多,另一个是在TkbmMemTable的加载数据时字段会执行OnValidate ...
- Delphi 在dbgrideh中表格输入数据时有效性的检查(转)
在数据库系统设计中经常要用到在表格中进行数据录入,如何判断在数据导入时的数据有效性呢?下面介绍几种常用的方法与大家交流. 方法一:Dbgrid是与Table,在Table的Column的OnSetTe ...
- DXDBGrid使用方法
http://www.cnblogs.com/gtsup/archive/2012/08/28/2660197.html dxDBGrid使用集锦 转载自:http://hi.baidu.com/ ...
- jQuery EasyUI 1.4更新记录
问题: menu:修复当删除一个menu项时.menu高度不准确. datagrid:修复当datagrid宽度太小时,fitColumns方法不能使用. 改进: 1.为easyui全部组件新增了自适 ...
- JNI详解---从不懂到理解
转载:https://blog.csdn.net/hui12581/article/details/44832651 Chap1:JNI完全手册... 3 Chap2:JNI-百度百科... 11 C ...
- query中对应的OnSetText和onGetText事件
今天在看代码的时候遇到一个问题,query中的某个字段和在表中显示的不是一个值,我觉得很奇怪,于是找了很久,才知道为什么,原来是query中的OnSetText和onGetText事件在作怪,经过一番 ...
- delphi7中 OnDrawColumnCell 事件怎么用
你问的这个事件应该是dbgrid控件中的吧?这个事件是在grid控件载入数据的时候触发的,至于你这个“怎么用”波及的范围太大了,呵呵!不知道如何说起!另外还是发一段相关的代码吧,这也是我之前提过问题, ...
- TField中的GetText和SetText
在数据表中的某些字段出于性能或数据规范化的考虑,会用组编号代替,就像学生有学号,员工有员工ID一样,但我们看的时候如果直接输入这样的编号看的人可能就会头痛了,这时就可用TField中的GetText转 ...
随机推荐
- 009_python魔法函数
11. (译)Python魔法方法指南 原文: http://www.rafekettler.com/magicmethods.html 原作者: Rafe Kettler 翻译: hit9 原版(英 ...
- matlab 整局-部视知觉实验(读取excel点阵设计图替换数据)
-------给我那编程盲的女盆友,我怎么感觉是我选了一门课???做了这么多次作业,还是整理出来吧,要知道双鸭山大学心理系单身妹子还是很多啊. 整体-局部范式是心理学的经典实验之一.请尝试利用 MAT ...
- 09 python初学 (字符串)
# 重复输出字符串 print('hello' * 2) # >>>hellohello # 字符串切片操作,最重要的!!!! print('hello'[2:]) # >&g ...
- Java中的hashCode() 和 equals()的若干问题解答
一.hashCode()的作用 哈希表这个数据结构想必大多数人都不陌生,而且在很多地方都会利用到hash表来提高查找效率.在Java的Object类中有一个方法: public native int ...
- Linux进程管理 (1)进程的诞生
专题:Linux进程管理专题 目录: Linux进程管理 (1)进程的诞生 Linux进程管理 (2)CFS调度器 Linux进程管理 (3)SMP负载均衡 Linux进程管理 (4)HMP调度器 L ...
- AGC004F Namori 树形DP、解方程(?)
传送门 因为不会列方程然后只会树上的,被吊打了QAQ 不难想到从叶子节点往上计算答案.可以考虑到可能树上存在一个点,在它的儿子做完之后接着若干颜色为白色的儿子,而当前点为白色,只能帮助一个儿子变成黑色 ...
- 记上海技术交流会之行备忘录(superset与odoo整合)
像每个早上一样,早起跑步回来冲个热水澡,简单的吃下早饭,看书到8:50的样子,准备赶10:02分的火车.在我看到周总的微信时,我知道这将是一个新的起点,在自己过往的2年时间,将更多的精力和时间用在了英 ...
- Python_老男孩练习题1
get有陷阱:value 5.以下打印的内容是:—————— —————— —————— [10, 'a'] [123] [10, 'a'] #方法一: 将list 转为 set #l ...
- c++入门之 深入cin
cin 表示输入流,但是究其本质,又能认识到什么呢?先上代码: #include "iostream" };//c++11中使用{}进行重新命名 int main() { usin ...
- Is-a
在知识表示.面向对象程序设计与面向对象设计的领域里, is-a(英语:subsumption,包含架构)指的是类的父子继承关系, 例如类D是另一个类B的子类(类B是类D的父类). 换句话说,通常&qu ...