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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Power Portals - How to...
Power Pages
Answered

Power Portals - How to Refresh a Subgrid on an Entity Form on click of a custom button?

(1) ShareShare
ReportReport
Posted on by 132

Hi Members,

 

Is there any way to refresh a sub grid using code or on click of a custom button on Entity Form in Power Portals?

 

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    Sahil Profile Picture
    132 on at

    I read another post that mentioned to sort the sub-grid column via JS and that helped me to refresh the grid.   

     

    $("[aria-label='Column Name']").click(). 

  • alok2k11 Profile Picture
    2 on at

    Hi Sahil,

    Is this the only solution to refresh/reload the subgrid?
    $("[aria-label='Column Name']").click().  this line changes the Sorting and if record is created in background, then subgrid goes blank when code is run 2nd time.

    Need some other approach. like $("#subgridid").reload(); if possible.

  • Pragatij Profile Picture
    44 on at

    Hi @Sahil ,

    I have gone through your post, I am also facing the same grid refresh issue. Did you find any solution for this.

  • Sahil Profile Picture
    132 on at

    Yes, I used a trick by clicking twice on any column via JS code in the sub-grid. On the first click, it refreshes and sorts the data, including the new record being created. On the second click, it resorts and brings your records back to the original sorting.

  • Sahil Profile Picture
    132 on at

    I believe there are other solutions available as well. In my case, since the record gets created in the background via a Web API call, I incorporated the sorting code within the success method of the API, and that worked for me. You might consider adding a wait condition to see if that helps, although it's not the most ideal solution.

  • Sahil Profile Picture
    132 on at

    I believe there are other solutions available as well. In my case, since the record gets created in the background via a Web API call, I incorporated the sorting code within the success method of the API, and that worked for me. You might consider adding a wait condition to see if that helps, although it's not the most ideal solution.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 50

#2
Valantis Profile Picture

Valantis 26

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard