1
votes

I am having two subgrids one below the other

I have a tab designed using a html webresource, on click of the tabs I will show/hide the subgrids accordingly

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

$(".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);
});

enter image description here

I also tried using normal jQuery to hide (using $("#parentid").hide() ) 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

1
you can use .hide() - guradio
yeah i tried .hide() but jQuery methods are not supported in CRM - Vignesh Subramanian
parent.Xrm.Page.ui.controls.getByName('CaseServicePlanContacts').style.display = 'none'; how about this one - guradio
when you use visibility it will still use the space but if you use display none it will not use the space - guradio
did you try display none what happened - guradio

1 Answers

4
votes

Try putting your subgrids into sections and hiding the section instead. This is fully supported by CRM and should not leave empty space behind.