Page 1 of 1

Hiding an Instance List Column

Posted: Tue Nov 10, 2020 9:15 am
by ESODevKJ
I have an instance list where I only need to see 2 columns (only 1 is a visual ID). In the uInitialize section of the Filter, I put the following logic:

Code: Select all

If (#AVLISTMANAGER.avVisualList *IsNot *NULL)
For Each(#Column) In(#AVLISTMANAGER.avVisualList.Columns)

If (#Column.ColumnCaption = 'Name')
#Column.CellMarginRight := 15
#Column.CellWidth := 1000
Else
If (#column.ColumnCaption = 'Customer Account')
#Column.CellWidth := 50
Else
If (#column.ColumnCaption = 'Company')
#column.Visible := False
Endif
Endif
Endif
Endfor
Endif

(The columns aren't changing width either).

Any help would be much appreciated. Thank you.

Re: Hiding an Instance List Column

Posted: Wed Nov 11, 2020 1:14 am
by jyoung
Its been a while, but by try setting the ColumnVisible property to false.
Note this is NOT #column.Visible := false, but #column.ColumnVisible := false (super confusing I know. :D)
Also I am doing this by memory so it may not be syntactically correct. ;)

Code: Select all

if (#AVLISTMANAGER.avVisualList *IsNot *NULL)
for each(#column) in(#AVLISTMANAGER.avVisualList.Columns)
#column.ColumnVisible := False
endfor
endif
Hope this helps,
Joe

Re: Hiding an Instance List Column

Posted: Wed Nov 11, 2020 3:45 am
by ESODevKJ
Thanks Joe, this was it. Also led me in the right direction with the column widths. Much appreciated!