PowerSnippets – Hide Controls

Decluttering the DOM tree when using large tables.

So the inevitable has happened. A customer or colleague has built a gallery to use as a table showing loads of columns and extending over the canvas’ border. Your app performance is degrading and due to that, sidescrolling becomes more of a drag than a pleasat experience.

Simply modify the visbility value of the controls in the following manner:

𝙸𝚏([𝙲𝚘𝚗𝚝𝚛𝚘𝚕].𝚇 + [𝙲𝚘𝚗𝚝𝚛𝚘𝚕].𝚆𝚒𝚍𝚝𝚑 >= 𝟶 && [𝙲𝚘𝚗𝚝𝚛𝚘𝚕].𝚇 <= 𝟷𝟹𝟼𝟶;𝚝𝚛𝚞𝚎;𝚏𝚊𝚕𝚜𝚎)​

This ensures that the control is hidden when not within the boundaries of the canvas. It is also really helpful when designing large tables within galleries.

That’s all folks.

16. marts 2022
Opdatering: 14. juli 2025

Nils Eibenstein

With an eye for practicality and a keen sense of detail, Nils supports our customers in introducing the Power Platform – from solution architecture to implementation. What he loves about his work is that no two projects are alike, and working with different people always brings new perspectives. His passion for tinkering is also evident outside of his project work – for example, when he brings complex ideas to life with 3D printing or thinks several moves ahead in board games.

Del denne artikel

Spørgsmål om emnet

Har du spørgsmål til artiklen, eller synes du, at emnet er interessant? Du er velkommen til at sende os en besked.