Ver Mensaje Individual
  #3  
Antiguo 28-07-2010
Avatar de Casimiro Noteví
Casimiro Noteví Casimiro Noteví is offline
Merodeador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.681
Reputación: 10
Casimiro Noteví Tiene un aura espectacularCasimiro Noteví Tiene un aura espectacular
Si te refieres a un checkbox, puedes hacerlo tú mismo, en el evento drawcolumncell del grid:

Código Delphi [-]

procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; 
  DataCol: Integer; Column: TColumn; State: TGridDrawState); 
var 
  R : TRect; 
begin 
  (*pinta checkbox*) 
  if Column.Field=ClientDataSet1ATIVO then 
  begin 
    DBGrid1.Canvas.FillRect(Rect); 
    ImageList1.Draw(DBGrid1.Canvas,Rect.Left+10,Rect.Top+1,0); 
    if ClientDataSet1ATIVO.AsBoolean then 
      ImageList1.Draw(DBGrid1.Canvas,Rect.Left+10,Rect.Top+1,2) 
    else 
      ImageList1.Draw(DBGrid1.Canvas,Rect.Left+10,Rect.Top+1,1); 
  end; 
end;
Responder Con Cita