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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 74 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 55

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard