Ver Mensaje Individual
  #7  
Antiguo 08-04-2015
Lenny Lenny is offline
Miembro
 
Registrado: jun 2007
Posts: 161
Reputación: 17
Lenny Va por buen camino
Talking Solucionado

estimados, muchísimas gracias por la ayuda, a pura prueba y error y con lo dicho ya lo solucione:

Código Delphi [-]
procedure TUsuarios.StringGrid1DrawColumnCell(Sender: TObject;
  const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF;
  const Row: Integer; const Value: TValue; const State: TGridDrawStates);
begin
      if (Sender as TStringGrid).Cells[3, Row] = 'Fals' then
  begin
    (Sender as TStringGrid).Cells[3, Row] := 'No';
    end
    else
  if (Sender as TStringGrid).Cells[3, Row] = 'True' then
  begin
    (Sender as TStringGrid).Cells[3, Row] := 'Si';
  end;
(Sender as TStringGrid).Cells[2, Row] := (Sender as TStringGrid).Cells[1, Row] + ' ' + (Sender as TStringGrid).Cells[6, Row];
end;

los primeros 2 IF cambian en el StringGrid los valores True / Fals por Si / NO (puede ser cualquier otro valor, Activado / Desactivado, etc.) y la ultima linea hace lo que necesito, cargar en el StrinGrid en la columna "Nombres" la concatenación del nombres y apellido del usuario cumpliendo con los requisitos de no tocar la estructura de la base de datos.

Solo me queda saber si existe una forma mas elegante y no tan artesanal de hacer esto, y donde mas aparte de DrawColumnCell puedo colocar el código, ya que no me sirve en el Form.Create por si se actualizan los datos.

Gracias por la ayuda y quedo atento a sus comentarios!.
Responder Con Cita