title: removing the empty space occupied by hidden field in CRM form
body: <p>I am having two subgrids one below the other</p>
  
  <p>I have a tab designed using a html webresource, on click of the tabs I will show/hide the subgrids accordingly</p>
  
  <p>When I hide the bottom subgrid, I don't get any problem, but when I hide the top subgrid, it hides the subgrid, but the space occupied by the subgrid is still there</p>
  
  <pre><code>$(".goalTab").click(function(event){
  parent.Xrm.Page.ui.controls.getByName('CaseServicePlanContacts').setVisible(false);
  parent.Xrm.Page.ui.controls.getByName('GoalSubgrid').setVisible(true);
  });
  
  $(".activityTab").click(function(event){
  parent.Xrm.Page.ui.controls.getByName('GoalSubgrid').setVisible(false);
  parent.Xrm.Page.ui.controls.getByName('CaseServicePlanContacts').setVisible(true);
  });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NgPGe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NgPGe.png" alt="enter image description here"></a></p>
  
  <p>I also tried using normal jQuery to hide (using <code>$("#parentid").hide()</code> ) the parent container, but its not supported in CRM. So is there a way to remove this empty space occupied by the hidden subgrid in CRM</p>