Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Field Input Translation



Permlink Replies: 1 - Last Post: Oct 12, 2017 12:57 PM Last Post By: Jeff Overcash (... Threads: [ Previous | Next ]
Harald Wolf

Posts: 13
Registered: 10/4/07
Field Input Translation
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 11, 2017 9:24 PM
Hi,
i need a Field Input Translation Function (using a TDBGirid).
For example a db integer field used to store milliseconds. Depending on some RadioButtons (Sec.,Min.,Hour....)
the Input of a cell should be recalculated and stored as milliseconds (for display i could use the OnDrawColumnCell-Event)

I have tried several Events (DataSet->OnDataChange, TFDQuery->BeforePost and many others).
But if the testet Event triggers it triggers more than once, so i have to frickeling araount with a flags...

What is the best way to archive a InputTranslation function?
Jeff Overcash (...

Posts: 1,453
Registered: 9/23/99
Re: Field Input Translation
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2017 12:57 PM   in response to: Harald Wolf in response to: Harald Wolf
Harald Wolf wrote:
Hi,
i need a Field Input Translation Function (using a TDBGirid).
For example a db integer field used to store milliseconds. Depending on some RadioButtons (Sec.,Min.,Hour....)
the Input of a cell should be recalculated and stored as milliseconds (for display i could use the OnDrawColumnCell-Event)

I have tried several Events (DataSet->OnDataChange, TFDQuery->BeforePost and many others).
But if the testet Event triggers it triggers more than once, so i have to frickeling araount with a flags...

What is the best way to archive a InputTranslation function?

TField has an OnGetText and OnSetText that you can manipulate things there.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02