<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Show/Hide Rows in a Grid Layout Dynamically? in Vuforia Studio</title>
    <link>https://community.ptc.com/t5/Vuforia-Studio/How-to-Show-Hide-Rows-in-a-Grid-Layout-Dynamically/m-p/1046201#M13091</link>
    <description>&lt;P&gt;After some testing i am able to find my own solution for this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;class (application)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;.hideRowDynamic div.row[data-hide="true"] {&lt;BR /&gt;display: none !important;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assign this class to gridLayout on which you would like to have this behaviour -&amp;gt; &lt;STRONG&gt;hideRowDynamic&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;home.js&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$scope.hideRow = function (rowIndex) {&lt;/P&gt;
&lt;P&gt;let widget = document.querySelector('[widget-id="gridLayout-77"]');&lt;/P&gt;
&lt;P&gt;if (!widget) return;&lt;/P&gt;
&lt;P&gt;let rows = widget.querySelectorAll("div.row");&lt;/P&gt;
&lt;P&gt;if (rows[rowIndex - 1]) {&lt;BR /&gt;rows[rowIndex - 1].setAttribute("data-hide", "true");&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;call the function on button click &lt;/STRONG&gt;or &lt;STRONG&gt;in&amp;nbsp; angular.element(document).ready(function () { })&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$scope.hideRow("7");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would for example hide the 7th row from grid layout..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Dec 2025 14:40:09 GMT</pubDate>
    <dc:creator>MA8731174</dc:creator>
    <dc:date>2025-12-04T14:40:09Z</dc:date>
    <item>
      <title>How to Show/Hide Rows in a Grid Layout Dynamically?</title>
      <link>https://community.ptc.com/t5/Vuforia-Studio/How-to-Show-Hide-Rows-in-a-Grid-Layout-Dynamically/m-p/1046189#M13090</link>
      <description>&lt;P data-start="162" data-end="188"&gt;&lt;BR data-start="171" data-end="174" /&gt;Hi everyone,&lt;/P&gt;
&lt;P data-start="190" data-end="308"&gt;I’m working with the &lt;STRONG data-start="211" data-end="226"&gt;Grid Layout&lt;/STRONG&gt; in Vuforia Studio and I’m trying to dynamically &lt;STRONG data-start="275" data-end="305"&gt;show or hide specific rows&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P data-start="310" data-end="335"&gt;The problem I’m facing:&lt;/P&gt;
&lt;UL data-start="336" data-end="570"&gt;
&lt;LI data-start="336" data-end="396"&gt;
&lt;P data-start="338" data-end="396"&gt;I cannot dynamically change the &lt;STRONG data-start="370" data-end="393"&gt;row or column class&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="397" data-end="459"&gt;
&lt;P data-start="399" data-end="459"&gt;I also cannot set their height/size to &lt;STRONG data-start="438" data-end="445"&gt;0px&lt;/STRONG&gt; at runtime.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="460" data-end="570"&gt;
&lt;P data-start="462" data-end="570"&gt;Simply hiding the widget inside the cell doesn’t help, because the &lt;STRONG data-start="529" data-end="569"&gt;row and column space remains visible&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-start="572" data-end="723"&gt;My goal is simple:&lt;BR data-start="590" data-end="593" /&gt;I want all rows to exist in the layout, but I want to &lt;STRONG data-start="647" data-end="674"&gt;toggle their visibility&lt;/STRONG&gt; (visible/invisible) without leaving empty space.&lt;/P&gt;
&lt;P data-start="725" data-end="764"&gt;Is there any workaround or method to:&lt;/P&gt;
&lt;UL data-start="765" data-end="913"&gt;
&lt;LI data-start="765" data-end="802"&gt;
&lt;P data-start="767" data-end="802"&gt;hide a full row in a Grid Layout?&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="803" data-end="860"&gt;
&lt;P data-start="805" data-end="860"&gt;collapse its height (similar to CSS &lt;CODE data-start="841" data-end="856"&gt;display: none&lt;/CODE&gt;)?&lt;/P&gt;
&lt;/LI&gt;
&lt;LI data-start="861" data-end="913"&gt;
&lt;P data-start="863" data-end="913"&gt;or dynamically modify grid definitions at runtime?&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P data-start="915" data-end="991"&gt;Any suggestions or best practices would be greatly appreciated.&lt;BR data-start="978" data-end="981" /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 13:38:58 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Vuforia-Studio/How-to-Show-Hide-Rows-in-a-Grid-Layout-Dynamically/m-p/1046189#M13090</guid>
      <dc:creator>MA8731174</dc:creator>
      <dc:date>2025-12-04T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Show/Hide Rows in a Grid Layout Dynamically?</title>
      <link>https://community.ptc.com/t5/Vuforia-Studio/How-to-Show-Hide-Rows-in-a-Grid-Layout-Dynamically/m-p/1046201#M13091</link>
      <description>&lt;P&gt;After some testing i am able to find my own solution for this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;class (application)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;.hideRowDynamic div.row[data-hide="true"] {&lt;BR /&gt;display: none !important;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assign this class to gridLayout on which you would like to have this behaviour -&amp;gt; &lt;STRONG&gt;hideRowDynamic&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;home.js&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$scope.hideRow = function (rowIndex) {&lt;/P&gt;
&lt;P&gt;let widget = document.querySelector('[widget-id="gridLayout-77"]');&lt;/P&gt;
&lt;P&gt;if (!widget) return;&lt;/P&gt;
&lt;P&gt;let rows = widget.querySelectorAll("div.row");&lt;/P&gt;
&lt;P&gt;if (rows[rowIndex - 1]) {&lt;BR /&gt;rows[rowIndex - 1].setAttribute("data-hide", "true");&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;call the function on button click &lt;/STRONG&gt;or &lt;STRONG&gt;in&amp;nbsp; angular.element(document).ready(function () { })&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$scope.hideRow("7");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would for example hide the 7th row from grid layout..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 14:40:09 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Vuforia-Studio/How-to-Show-Hide-Rows-in-a-Grid-Layout-Dynamically/m-p/1046201#M13091</guid>
      <dc:creator>MA8731174</dc:creator>
      <dc:date>2025-12-04T14:40:09Z</dc:date>
    </item>
  </channel>
</rss>

