Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Customize & Extend
Answered

Hide subgrid column - can't reach TD element

(0) ShareShare
ReportReport
Posted on by 87

Hi all

 

I am looking to hide a column on a basic form subgrid using JS at the Web template level.

 

I have done this successfully with fields and list columns, but when traversing the DOM to reach the <TD> element I need, I can't seem to reach it. That is, the .grid-view element has child elements in the DOM (table body and so on) but my jQuery .children() call returns nothing.

 

Am I missing something or are subgrid elements not accessible?

 

 

  • Verified answer
    oliver.rodrigues Profile Picture
    9,315 Most Valuable Professional on at
    Re: Hide subgrid column - can't reach TD element

    hi @RK2021 can you try the code from this article?: http://oliverrodrigues365.com/2020/07/19/power-apps-portals-javascript-tip-01-hide-show-elements/

     

  • RK2021 Profile Picture
    87 on at
    Re: Hide subgrid column - can't reach TD element

    Thanks for this code, I have tried it and other variants, but it seems the tr and TD elements in the subgrid cannot be reached. Even doing .find() for all TR elements only finds the document grid, not the two subgrids I have on the form.

     

    Perhaps it's related to the message in the documentation that validation code cannot be applied to subgrids? Perhaps they are beyond client-side scripting.

     

  • Saud Ali Profile Picture
    812 Super User 2024 Season 1 on at
    Re: Hide subgrid column - can't reach TD element

    Hi @RK2021 ,

     

    Here is the sample code by using which I can reach out to my table's first td and can hide it. This is a sample you can modify according to your needs.

     

    var tdElement = $('table td:eq(1)'); //Fetching first column of my table
    tdElement.hide();

     

    Thanks,

    Saud

     

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43

Featured topics