 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Abdullah Kauchali Guest
|
Posted: Mon Jul 11, 2005 11:36 am Post subject: TADODataSet and the TField.OnChange event |
|
|
Got an application that displays a disconnected TADODataset to the user.
The user can change any field. But the moment she "leaves" the record,
I post the record to the database (TADODataSet.AfterPost) [Thanks to
Vitali Kalinin I was able to get the "Delta"! ].
However, I would like to display a "Save" icon that gets enabled and
disabled after the user "dirties" any single field and saves the record
to the database respectively. (Touch or dirty a field, icon gets
enabled, save the record - icon gets disabled kinda thing.)
Is there any global event on the TADODataSet that I can use to determine
whether the contents of a single field have been changed or is
TField.OnChange (for /each/ field) the only place to do this? In which
case I have to iterate through all the fields on my ADODataset.
Any suggestions appreciated.
Kind regards,
Abdullah
|
|
| Back to top |
|
 |
Kostas Terzides Guest
|
Posted: Mon Jul 11, 2005 2:29 pm Post subject: Re: TADODataSet and the TField.OnChange event |
|
|
Abdullah Kauchali wrote:
| Quote: | Got an application that displays a disconnected TADODataset to the user.
The user can change any field. But the moment she "leaves" the record,
I post the record to the database (TADODataSet.AfterPost) [Thanks to
Vitali Kalinin I was able to get the "Delta"! ].
However, I would like to display a "Save" icon that gets enabled and
disabled after the user "dirties" any single field and saves the record
to the database respectively. (Touch or dirty a field, icon gets
enabled, save the record - icon gets disabled kinda thing.)
Is there any global event on the TADODataSet that I can use to determine
whether the contents of a single field have been changed or is
TField.OnChange (for /each/ field) the only place to do this? In which
case I have to iterate through all the fields on my ADODataset.
Any suggestions appreciated.
Kind regards,
Abdullah
|
I would probably use Actions and handle Action OnUpdate event:
ActionSave.Enabled:=AdoDataSet.UpdatesPending
or something like that
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|