Hiding columns in table view

I have a simple form set to table view. At runtime, I want to remove from view some columns with an On Show method, depending on what the user needs to see.
I’ve named the elements I want to hide, and put

if (username == “Bloggs”)
{
elements.mrcp.visible = false
elements.units.visible = false
}

This hides the columns, but not the headers, leaving an unattractive space. I am hoping find a way to get the headers to disappear and the columns all to shuffle to the left, without creating a different form for each combination.

Thanks in advance.

This works right in Servoy 3 and does not work in Servoy 2.xxx.

Thanks Patrick, I guess it’s nearly time to upgrade to 3!