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转 ...
随机推荐
- 【vue】vue +element 搭建项目,使用el-date-picker组件遇到的坑
1.html <el-form-item prop="dateTime"> <el-date-picker v-model="messageDataFo ...
- spring boot启动报错
Exception encountered during context initialization - cancelling refresh attempt: org.springframewor ...
- ESP32入门示例 - SD卡Web服务器
这个是来自ESP32官方示例的改版,官方的示例由于存在一些问题所以我进行了修改原本的示例有点逻辑上的问题,所以进行了一些修改 主要修改有:1.新增SD卡测试部分 复制自官方SD卡示例2.新增一个根目录 ...
- 14 python初学(高阶函数 递归函数 内置函数)
高阶函数:1. 函数名是一个变量,函数名可以进行赋值 2. 函数名可以作为函数参数,还可以作为函数返回值(函数名称作为函数返回值时返回的是:函数的地址:print 这个返回值的调用相当于执行这个函数 ...
- LNMP安装,FastCGI说明
1.1.工作原理讲解说明 1. 用户请求的静态文件,由nginx服务器处理,根据静态的location配置进行处理 用户请求的动态文件,由php服务进行处理,根据动态的location配置进行处理 2 ...
- eclipse如何设置断点&断点处运行快捷键
第一步: 设置断点:在该行最前面边框双击 或快捷键:Ctrl+Shift+B 第二步: Debug 运行启动 第三部: 运行到断点后: 使用快捷键F5,F6,F7单步执行. F5:Step ...
- [intoj#7]最短距离
190227模拟 题目描述 给定一张 N 个点的有向图,点 i 到点 j 有一条长度为 i/gcd(i,j) 的边. 有个 Q 询问,每个询问包含两个数 x, y,求从点 x 出发到点 y 的最短距离 ...
- odoo 11 配置nginx反向代理
第一步 安装nginx 和 certbot 具体步骤可以参考这篇文章的第6,7步. 第二步 配置nginx映射到odoo网站的文件,主要有2个,文件中的cloudapp.top是我们自己的域名, ...
- android截屏
截屏是一个常用的操作,经常会有这种需求. 截屏的工具类 package com.fxb.screenshot; import android.app.Activity; import android. ...
- ASP.NET Core MVC之ViewComponents(视图组件)知多少?
前言 大概一个来星期未更新博客了,久违了各位,关于SQL Server性能优化会和ASP.NET Core MVC穿插来讲,如果你希望我分享哪些内容可以在评论下方提出来,我会筛选并看看技术文档来对你的 ...