Whoops, sorry. Should have read my reply more thoroughly. The oncalac is in TTable and not grid.
Tony
: I could not found OnCalc event in the grid, but I found in the TTAble, and there it works fine, as you outlined, so thanx you helped a lot!
:
:
: : : Hi!
: : :
: : : I would like to change the displayed value in a DBGrid. The field is a Boolean type, and the default view is true or false. And I would like to change it in the Grid. If the field contains true, display somthing else, like 'payed', and if false, display 'not payed'!
: : :
: : : I would appriciate any help!
: : :
: : : Thanx
: : :
: :
: : Easiest way would be to create a string calculated field in the grid and add the code to the grid onCalc event like:
: :
: : If Grid.field.value := True then Calculated.Field.Value := 'Paid'
: : else Calculated.field.Value := 'Not Paid'
: :
: : I've paraphrased this. Assume you can work out the proper code.
: : Then you can hide the boolean field assuming you don't want to see it.
: :
: : HTH
: : Tony
: :
: :
: :
:
: