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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Hiding Sub Grid

(0) ShareShare
ReportReport
Posted on by

Hi,

I am trying to hide a sub grid in a section(This section has four columns), there are multiple sub grids in this section but i want to hide just one of them.

When I run this line of JS: "Xrm.Page.getControl("LeadsCostConsultant").setVisible(false);" it hides all of the sub grids that are in the same row.

Any help will be great

Thanks

*This post is locked for comments

I have the same question (0)
  • Ivan Ficko Profile Picture
    1,380 on at

    First of all you must provide us more information about your case so we can try to recreate the issue (screenshot of your form would help).

    Everything looks fine with line of code you posted if "LeadsCostConsultant" is the subgrid name property.

  • Suggested answer
    Koen VdV Profile Picture
    1,219 on at

    Why don't you make 4 sections, with in each section just one subgrid. Then hide the section and your problem will be solved.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Have not experienced this behavior exactly, but as best practice have a single subgrid per section.

    Then you can hide both the section or the subgrid in the section.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Use this Code

    Xrm.Page.getControl(“gridname”).setVisible(false);

    I think your passing section name,instead section name pass unique sub grid name other wise use this one

    var jj_subGrid = Xrm.Page.ui.controls.get("jj_ContactsGrid");

    // For hiding

    jj_subGrid.setVisible(false);

    // For Showing

    jj_subGrid.setVisible(true);

    // For Checking If it is Visible or Hide

    jj_subGrid.getVisible();

    Best Regards,

    Purushotham Boomireddy,

  • Mahendar Pal Profile Picture
    45,095 on at

    Strange , can you share some screenshots here??

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Jeff,

    i think it may be a "by design" behaviour.

    According to my experience, when you "hide" all the controls within a section, the section too will be hidden.

    Maybe CRM does not consider Subgrid as standard control.

    Please, try to insert another attribute in the section and leave it always visible to test what i said.

    Let us know.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Community Member Profile Picture
    on at

    Hi Jeff,

    if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans