VLF-ONE : Instance List Browser

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Gilamonster
Posts: 11
Joined: Thu Nov 26, 2015 3:11 am
Location: France

VLF-ONE : Instance List Browser

Post by Gilamonster »

If we programmatically hide a column of the instance list using the code below:

Code: Select all

Set Com(#AVLISTMANAGER.InstanceListBrowser.AColumns<1>) Columnvisible(False)
How can we reflect this change in the "Show, Hide or Reorder columns" panel?
...to get the presentation below :

Image
Attachments
PanelHide.png
PanelHide.png (10.53 KiB) Viewed 7070 times
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: VLF-ONE : Instance List Browser

Post by MarkDale »

You are using low level access to the prim_list attributes by doing this.

In the documentation there is a specific warning:

"Do not change list column or list item visibility unless you are sure it will not interfere with built in features like: Quick Search, Column Hide / Show and Column Filtering."

under
Low Level Direct Access To The Visualization List in VLF-ONE Instance Lists
Some Significant Usage Points
http://docs.lansa.com/14/en/lansa048/in ... c496549145


The problem is that you are directly changing the visual control, and it gets out of sync with the VLF system storage of column properties.

There is currently no listmanager method for programmatically showing or hiding an instance list column.
jyoung
Posts: 694
Joined: Thu Jan 21, 2016 6:43 am
Location: Oklahoma City, OK USA

Re: VLF-ONE : Instance List Browser

Post by jyoung »

You can do this, but it will likely require you to use a custom instance list.
Doing so will allow you to control the instance list like a normal PRIM_LIST. You could then add your own button and menu to toggle the column visibility.

http://docs.lansa.com/14/en/lansa048/in ... 8_6090.htm
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-ONE : Instance List Browser

Post by MarkD »

Would having an option to turn off the shipped VLF column choice feature be helpful here?

Most other instance list options follow this ‘turn it off’ capability, but this one does not.

ie: Either the you use the VLF’s shipped feature, or you turn it off, and handle it in your own code. That’s because having a half-and-half control situations is probably always going to cause issues, as the documentation suggests.
Post Reply