procedure TfrmUserMonth.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if csLoading in ComponentState then exit;//控件处于装载状态
if DBGrid1.Fields[1].AsString=dbeUserNum.Text then
begin
DBGrid1.Canvas.Brush.Color:=$00D9F3EB;///clSkyBlue;
DBGrid1.Canvas.Font.Color:= clDefault;
end;
DBGrid1.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;
其中dbeUserNum.Text是你数据表关连的唯一标志