Hiding and showing columns in pages

Hello,

I have a question about hiding and showing columns in page by checking the checkmark.
Is it ever possible to do so?

In classic(forms) it is possible to hide and show columns that way.
Its purpose is to easen the show and hide column process. If necessary the person can just check the checkmark and make some columns visible.

Any ideas appreciated,
Amaraa

Simply can I hide or show column by code?