-2
Good afternoon.
I’m trying to change a cell phone T for Sim and F for Não, because the visualization on DBGrid this being T or F as shown in the Table in the database.
I’ve made many attempts like:
procedure TFrm_Cadastro_Feriado.DBGrid1DrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
Var
  S: String;
begin
  if Column.FieldName = 'nome da coluna' then
  with DBGrid1.Canvas do
  begin
    S := Column.Field.AsString;
    begin
      if S = 'T' then
      begin
        S := 'Sim';
      end;
    end;
						
This way did not work, because alter the general behavior of the table referring to this column, when I do the case I have to make the alias at the end of the command with this does not recognize in the column because it does not exist in the database
– Murilo Cruz