afterscroll 取得id,invalidate
ondrawcolumn if fieldbyname('id') then 颜色
procedure TQryResult_F.DBGrid2DrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if qrypara.fieldbyname('dot_time').asinteger=ndot_time then
begin
dbgrid2.Canvas.Font.Color:=clblue;
dbgrid2.DefaultDrawColumnCell(rect,datacol,column,state);
end else
begin
dbgrid2.Canvas.Font.Color:=clblack;
dbgrid2.DefaultDrawColumnCell(rect,datacol,column,state);
end;
end;
procedure TQryResult_F.QryparaAfterScroll(DataSet: TDataSet);
begin
ndot_time:=qrypara.fieldbyname('dot_time').asinteger;
dbgrid2.Invalidate;
end;