检测表单上的字段更改 [英] Detecting field changes on a form
问题描述
是否可以检测表单上的任何字段是否已更新.
这样您就知道是否提交信息.
在foxpro中,我们有getfieldstate集合,该集合为数据记录中的所有字段分配一个数字,并返回一个数字,指示当单个字段已更新或整个记录已删除时记录的状态..
例如,如果一个表具有五个字段并且仅第一个字段已更改,则GETFLDSTATE()返回121111-第一个"1"表示未删除记录.
谢谢
Scott
Is it possible to detect if any of the fields on a form have been updated.
so you know whether to commit the information or not.
in foxpro we have getfieldstate that sets allocates a number to all the fields in a data record and it returns a number indicating the condition of the record wheter an individual field has been updated or the entire record has been deleted..
For example, if a table has five fields and only the first field has been changed, GETFLDSTATE( ) returns 121111 - the first "1" indicates the record was not deleted..
thanks
Scott
推荐答案
每个字段"都是文本框或其他控件.它们具有更改文本,更改所选索引等事件.您需要使用这些事件来确定是否已更改某些内容,或者需要重新读取数据并将其直接与控件进行比较.没有内置的东西可以帮您.
Each ''field'' will be a textbox or other control. They have events like text changed, selected index changed, etc. You need to use those events to work out if something has been changed, or you need to reread the data and compare it to the controls directly. Nothing build in does it for you.
这篇关于检测表单上的字段更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!