TMSFNCDatagrid Headername change

In a TMSFNCDatagrid i want to change the Text of the Header in Cell[0,0].
The Datagrid is connected to a Databaseadapter and the FieldName is 'Vorname' but the user want the Text 'Firma' to show.
GridDatabaseAdapterP.FieldNames[0] := 'Vorname';

If i try to change the DataGridPartner.Columns[0].Header := 'Firma'; In the Form.Create.
There is also shown 'Vorname' as Headertext.

How to show an other Text in the Header of the Grid as the Fieldname is.

You need to set the DisplayLabel property of the Field

Where to find "DisplayLabel" in wich component and Property.
I cannot change the Name of the Field.

It's a property of the TField, which is then used to display in the grid.
So you can access the field with DataSet.FieldByName('MyField').DisplayLabel := 'My Header';

1 Like

Thank you Pieter this works for me.

1 Like