Recent

Author Topic: Get old value of edited field  (Read 5131 times)

Zomis

  • Jr. Member
  • **
  • Posts: 95
Get old value of edited field
« on: March 05, 2007, 11:16:59 am »
I've tried using TSqlite3Dataset.OnAfterEdit, TDataSource.OnDataChange, TDataSource.OnUpdateData and get the datasets field.OldValue, field.NewValue, field.Value, field.CurValue - but they all return the same thing!

When using OnAfterEdit, they all return the old value,
when using the other events, they all return the new value.
And OnAfterEdit is only executed on the first edit. If you edit a field, and go back to the field and edit it again (without changing row of the dataset), the event was only called for the first edit.

I'm using a TDBGrid connected to a TDataSource connected to a TSqlite3Dataset. And I want to log all the changes that is done manually in the TDBGrid, when I edit a field I want to get both the fields previous value and it's new value.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 458
RE: Get old value of edited field
« Reply #1 on: March 05, 2007, 03:29:40 pm »
Did you tried BeforeEdit event?

Zomis

  • Jr. Member
  • **
  • Posts: 95
RE: Get old value of edited field
« Reply #2 on: March 07, 2007, 11:28:20 am »
Just tried the BeforeEdit event, didn't work there either. Same result as AfterEdit

Reported to the bugtracker

 

TinyPortal © 2005-2018