I have a datasource and a dataset in Delphi 2009. I would like, if my a column (AT) value = 1, then datasource autoedit properties will be true, other value false. I tried use onStateChange, but its not good event for me. This column have 2 value 1 or 0, and I saw, this if is true, but i dont know, which event can help me. 🙂
Example:
procedure TdmodUnion.dsoQuotationsStateChange(Sender: TObject);
begin
if dsetQ.FieldByName('AT').AsInteger=1 then
dsourceQ.AutoEdit:=true;
end;
What can i choose?
Thanks!
You could use OnDataChange, Field is within Parameters.
If you are using ADO, then AfterScrollEvent of then dataset is usefull, too.