Data Grid - Hide Columns

Hi, I am testing the TTMSFNCDataGrid visual grouping features in Rad Studio 13.

Can you create a hidden column, which could stores a database ID? Using the standard stringgrid, I can set the ColWidths to -1

Thanks Stuart

Hi,

You can call HideColumn(X) where X is the index of the column you want to hide.

Thanks Pieter, that works initially but after I drag columns into the visual grouping header, they appear.

In the example below the MenuID and TypeID columns are hidden at the start.

Recording 2026-04-14 160510

Hi,

To work around this you can implement 2 events:

procedure TForm1.TMSFNCDataGrid1AfterCloseHeaderGroup(Sender: TObject;
AColumn: Integer);
begin
  TMSFNCDataGrid1.HideColumn(8);
  TMSFNCDataGrid1.HideColumn(9);
end;

procedure TForm1.TMSFNCDataGrid1AfterDropHeaderGroup(Sender: TObject;
AColumn: Integer);
begin
  TMSFNCDataGrid1.HideColumn(8);
  TMSFNCDataGrid1.HideColumn(9);
end;

We’ll write this down and see what can be done to improve this.

Thanks Pieter, thanks that works.

Yeah, it would be nice if there was a option to permanently hide a column...

Thanks, Stuart

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.