I have field data named "WAIT" it between 0 and 1 , I want to display it by text value not by its real numeric value , e.g 'Wait','No wait' .
Asked
Active
Viewed 186 times
0
-
I'm not going to post this as an answer because I don't have the TMS grid to test it on. The usual methods of dealing with this problem are a) use the field's OnGetText event to return the 'Wait', 'No wait' text depending on the field's value and b) add a fkCalculated or fkInternalCalc field of ftString type and set its value in the dataset's onCalcFields event. Either of these takes only a minute or two to do. – MartynA Jul 10 '20 at 14:35
-
Thank you , I do the " the field's OnGetText" and it work , Although I was do it in Dbadvgrid OnGetTex before I had asked , but it didn't work. – Mohamed Abdelati Jul 10 '20 at 15:01
-
Thanks. As you've confirmed that the field's OnGetText worked for you, I have posted an answer based on my comment, as questions with answers on SO are generally of more use to future readers. – MartynA Jul 10 '20 at 16:58
1 Answers
1
The usual methods of dealing with this problem are:
a) use the Wait field's OnGetText event to return the 'Wait', 'No wait' text depending on the field's value and
b) add a fkCalculated or fkInternalCalc field of ftString type called e.g. WaitText and set its value in the dataset's OnCalcFields event, based on tthe value of your Wait field.
Either of these takes only a minute or two to do.
Using option a) requires you to set up, if you do not already have them, so-called "persistent fields" on the dataset containing the Wait field, which you do via the Fields Editor accessible from the pop-up menu by right-clicking the dataset component in the IDE.

MartynA
- 30,454
- 4
- 32
- 73