Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Change size of invisible subgrids

Posted on by Microsoft Employee

Hi, all.

I am using MS CRM 2016 On-Premises. I have about 20+ subgrids on form with visibility based on some logic. 
But when I am hiding grids, setting visible = false, invisible grids are still taking their place by size.
You can see white space on the center-right on screen, there are about 3 invisible subgrids.

As I understood, I need dynamically set invisible grids height to 0 or 1 pixel. But using code

Xrm.Page.getControl(gridname).$1_3.get_turboGridControl().set_height(0); 


has no result.
Is there the way, to hide grid and to set invisible control height to 0 ?
What am I doing wrong?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Change size of invisible subgrids

    Thank you very much. It works ! :-)

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Change size of invisible subgrids

    Hello,

    I hope that you know that usage of  .$1_3.get_turboGridControl().set_height(0); syntax is not documented (i.e. unsupported) so it could be quite difficult to fix your code to make it work for 100%.

    As alternative approach that I used and it worked perfectly I can suggest is embedding of grids inside sections and settings visibility of whole section (an not grid) depending on your conditions.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans