* Added OnValidate event support (17510)

git-svn-id: trunk@17220 -
This commit is contained in:
michael 2011-04-02 10:36:48 +00:00
parent 28ce3b96f0
commit e8cf8e4177

View File

@ -820,7 +820,15 @@ procedure TField.SetData(Buffer: Pointer; NativeFormat : Boolean);
begin
If Not Assigned(FDataset) then
DatabaseErrorFmt(SNoDataset,[FieldName]);
if (FieldNo>0) and not (FDataSet.State in [dsSetKey, dsFilter]) then
begin
if ReadOnly then
DatabaseErrorFmt(SReadOnlyField, [DisplayName], Self);
Validate(Buffer);
end;
FDataSet.SetFieldData(Self,Buffer, NativeFormat);
if not (FDataSet.State in [dsCalcFields, dsFilter, dsNewValue]) then
DataChanged;
end;
Procedure TField.SetDataset (AValue : TDataset);