[solved] TDBGrid : add text in a cellule lazarus / 16-Databases ---------------------------------------------------------------------- folkeu08 · 2020-08-06 17:08 Hi, The field that I display in a cell is declared as interger in MySQL database. They are displayed in a column of a TDBGrid. I would like to add to the display the value "months' to get "36 months". I don't tell you how to do this because there is no "addtext" field in the column. Thanks François ---------------------------------------------------------------------- balazsszekely · 2020-08-06 18:29 Hi François, Double click the query which is linked to the dbgrid. Select the integer field, then go to the Object Inspector->Events->OnGetText. Create the event, then: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TfMain.SQLQuery1GetText(Sender: TField; var aText: string;  DisplayText: Boolean);begin  aText := IntToStr(Sender.AsInteger) + '  months';end; ---------------------------------------------------------------------- folkeu08 · 2020-08-07 12:00 Very tanks, it's good. François