1 (edited by papafrankc 2021-12-18 23:39:21)

Topic: SOLVED: Make a Table Grid column NOT visible

Hi all,
I have a table grid that I sort with the following filter:
(tbl_SparePart.Spare = "Installed")   
I'm looking for results in my table for ONLY Installed parts.
This works fine, however I don't need this column to display the results because they will all be the same - Installed.
Note: the other option for this field is SPARE.  I have another table grid that looks for ONLY Spares.
.
If I leave out this column from the table grid, it fails.
So I'm wondering if there is a way to make this column not visible?
.
Note: I just found a setting under Properties for my table:
Properties/Options/goHideColumns This sounded like what I want so I set it to True.  But I don't see any change or see any way to hide a column by setting this property to True??
.
Or maybe there's a better way to get the Installed records without using the filter option?
.
SOLVED - thanks to some info I found on the forum from EHWagner - 2017 I have solved my problem.
procedure frmMainMenu_OnShow (Sender: TObject; Action: string);
begin
  frmMainMenu.tblGridInstalled.Columns[7].Visible := False ;
  frmMainMenu.tblGridSpares.Columns[5].Visible := False ;
end;

When I open the form with the table grids, I just hide them. And my filtering still works OK.  The forum came through again smile
.
Thanks
Frank