以第二列为例procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);var R,R2:TRect; DF:Cardinal;begin TDBGrid(Sender).Canvas.FillRect(Rect); R:=Rect; inc(R.Top,3); R.Bottom:=R.Top+13; R.Right:=R.Left+17; R2:=Rect; inc(R2.Top,2); inc(R2.Left,2); dec(R2.Right,2); dec(R2.Right,2); DF:=DT_LEFT; case Column.Field.Alignment of taLeftJustify: DF:=DT_LEFT; taRightJustify: DF:=DT_RIGHT; taCenter: DF:=DT_CENTER; end; if Column.Index=1 then //第二列 begin if TDBGrid(Sender).DataSource.DataSet.RecNo mod 2=0 then DrawFrameControl(TDBGrid(Sender).Canvas.Handle,R, DFC_BUTTON,DFCS_BUTTONRADIO or DFCS_CHECKED) else DrawFrameControl(TDBGrid(Sender).Canvas.Handle,R, DFC_BUTTON,DFCS_BUTTONRADIO); R2.Left:=R2.Left+18; DrawText(TDBGrid(Sender).Canvas.Handle,PChar(Column.Field.AsString), -1,R2,DF); end else DrawText(TDBGrid(Sender).Canvas.Handle,PChar(Column.Field.AsString), -1,R2,DF);end;