Subject Re: [IBO] Altering Column Headers: Q. & Suggested enhancement
Author Frank Ingermann
Hi Raymond,

Raymond Kennington wrote:
> Is it possible to dynamically alter column headers via the connection component?
> If so, is it necessary to close the connection first for the change(s) to take effect?
> In my app each user can set the header for several columns to whatever they want and these
> could be different for different forms. An options file will store the headers for each
> table used on each form.

if they can be different for different forms, then setting it up at the
connection level won't get you far - you could put a default value in there
(FieldsGridLabel with entries like "MYTABLE.MYCOLUMN=My Title") however.

> Requested enhancement:
> IB_Connection1.SetColumnName(const TableName : String; const ColumnName : String);
> with an exception raised if either name DNE.
> Every time a new form opens I will have to update the headers.

i'd go for loading the FieldsGridLabel prop of the Query on each FormCreate from
the options file (or a blob column in the gdb itself) - it's just a plain
TStrings descendant.

(changing lines in the property will directly reflect in your grid)

> Raymond Kennington

when parsers parse, and compilers compile, then why don't objects object?

fingerbirdy - fingerman's door to Firebird