Mohamed Abdelati
Mohamed Abdelati

Reputation: 49

ChangingTMS DBAdvgrid cell value at runtime

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' .

Upvotes: 0

Views: 235

Answers (1)

MartynA
MartynA

Reputation: 30735

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.

Upvotes: 1

Related Questions