web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

removing the empty space occupied by hidden field in CRM form

(0) ShareShare
ReportReport
Posted on by 347

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);
});


0458.goals.png

now how can i remove that empty space of the hidden subgrid?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You use DOM manipulations as I can see (based on image that you show plus on code that you use). I believe it would not be a big deal to investigate dom, find parent div for your subgrids and hide it using jQuery.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Duplicate. Moderators, please delete message.

  • svignesh Profile Picture
    347 on at

    Hello Andrii,

    I was able to find the parent, but jQuery is not able to hide it

    jQuery("#GoalSubgrid_TopTD").hide()

    I tried the above code and the td was not getting hidden. I tried at multiple levels in browser console, but no luck

    Its because, the javascript is running in an iframe and it wont be able to show/hide elements of other iframes. Is there a way in CRM to hide it? just like setVisible is there a setDisplay or some other function?

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Looks like you are trying to hide td element. I would suggest to try to hide parent of it - tr element.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans