Change headers in printgrid

How can I access detail headers used in frPrintGrid so I can change alignment and text?

Comments

  • edited August 2004
    Support please. Assume that the grid is generated from a dynamic query, so fields are unknown at design time.
  • gordkgordk St.Catherines On. Canada.
    edited 9:14AM
    Hi The properties of the printgrid columnheader that can't be set from the header prop of the printgrid object can be changed in the grid itself.
    after activating query and before calling showreport

    procedure TForm1.Button2Click(Sender: TObject);
    begin
    query1.active := true;
    dbgrid1.Columns[0].Title.Caption:= 'Mynew title';
    frprintgrid1.showreport;
    columns index is 0 based array of TColumn
    ;)

Leave a Comment