Page 1 of 1

Hiding List Columns dynamically

Posted: Fri Nov 04, 2016 4:08 pm
by soa
I have a list control with several columns that I'd like to show/hide dynamically. I have code like.

Clr_List Named(#lstCourseEnrolments)

#ColumnNUMHRS1.Visible := false
#ColumnYEAR10ASS1.Visible := false
#ColumnYEAR10GRA1.Visible := false
#ColumnYEAR10GRD1.Visible := false

#ColumnSCHLNM_W1.Visible := true
#ColumnUNIHRS1.Visible := true

for

Add_Entry To_List(#lstCourseEnrolments)

endfor

The first time through this seems to work but in subsequent runs setting the first three columns to visible and hiding the last two does not have an effect.

Have I missed something (highly probable)?

Re: Hiding List Columns dynamically

Posted: Fri Nov 04, 2016 4:38 pm
by MarkDale
I'm not sure of the environment you are in, but if its something like a #PRIM_LIST column, in VL_web, V14SP1 or later, I found that the ColumnVisible property was better for controlling column visibility.

Re: Hiding List Columns dynamically

Posted: Fri Nov 04, 2016 4:58 pm
by soa
Thanks Mark, I 'll give that a try (on Monday).

I'm using VLW 14SP1.