This is the default behavior for TBooleanField.DisplayValues
. Look at the db
unit source:
db.TBooleanField.SetAsString
and db.TBooleanField.SetDisplayValues
.
If you set TField.DisplayValues := 'Yes;No';
for example: Y
, Ye
, Yes
will represent True
; N
, No
will represent False
.
You cannot add more values to it. Unless you utilize OnSetText
as suggested by the other answer, or use a TDbGrid.PickList
.
Personally, I would use a CheckBox
for Boolean field value representation on the TDBGrid
.
There are plenty of examples out there on how to do that.