dbgrid显示access备注信息

procedure TfrmAllFind.DBGrid6DrawColumnCell(Sender: TObject; const Rect: TRect;
  DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
  if(column.field = dgSendedDetail.DataSource.DataSet.FieldByName('要素值')) then
  begin
       dgSendedDetail.Canvas.FillRect(Rect);
       dgSendedDetail.Canvas.TextOut(Rect.Left,Rect.Top,column.field.AsString);
  end;
  if(column.field = dgSendedDetail.DataSource.DataSet.FieldByName('要素附加值')) then
  begin
       dgSendedDetail.Canvas.FillRect(Rect);
       dgSendedDetail.Canvas.TextOut(Rect.Left,Rect.Top,column.field.AsString);
  end;
end;

 

你可能感兴趣的:(Access)