楼主你还真的不会变通,如果不想去研究dbgrid的实现达到更好的效果,可以这么做,
既然你知道要刷新某行,那么在button click里记下条件,然后调用dbgrid.repaint,
其实就是执行DBGrid1DrawColumnCell啦,把条件那行代码改一下,ok-----------
procedure TfrmImport.DBGrid1DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if (qryImport.FieldByName('...').AsString <> '') then ---条件
dbgrid1.Canvas.Brush.color := $00E4CAB8
else
dbgrid1.Canvas.Brush.color := clWhite;
dbgrid1.Canvas.Font.Color := clBlack;
dbgrid1.DefaultDrawColumnCell(rect,datacol,column,state);
end;