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 / Not able to refresh Su...
Power Pages
Answered

Not able to refresh Subgrid on Power Pages form

(0) ShareShare
ReportReport
Posted on by 44

Hi everyone,

I have added a subgrid on power pages form and I want to refresh/reload the subgrid on buttonclick, but I am not able to achieve this.

I have tried with $('#Subgrid').load() but its not working

Also tried with column sorting $("[aria-label='Column name']").click() but this is not working in case of pagination.

Please let me know if anyone is having solution for this.

 

Categories:
I have the same question (0)
  • fm_skeller Profile Picture
    277 Moderator on at

    @Pragatij you can reload a subgrid with javascript by triggering the "refresh" event of the entity grid:

    $("#subgridid .entity-grid").trigger("refresh");



  • Pragatij Profile Picture
    44 on at

    @fm_skeller Thank you for your reply grid refresh is working now but can we write similar function for grid reload.

  • fm_skeller Profile Picture
    277 Moderator on at

    @Pragatij I am not sure what you mean by grid reload? How is this different from a refresh? Are you referring to the event that triggers when the subgrid is done loading?

  • Pragatij Profile Picture
    44 on at

    @fm_skeller using trigger refresh the subgrid is getting refreshed but still its not reflecting the latest added value in the grid. using $("[aria-label='column Name']").click(); function the grid is reflecting the latest added value but with this pagination of the grid is breaking.

    So I want the grid to reload and show all the newly added records 

  • Verified answer
    ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Pragatij 

     

    The simple way is to sort the column by ascending/descending after the subgrid is refreshed. 

    Try the below code 

     

    In Power Pages Mangagement App: 

     

    1. Under Content > Lists> Choose the list

     

     

    ragavanrajan_0-1708943021010.png

     

    2. Options> Custom JavaScript 

     

    Add the following code 

     

    $(document).ready(function() {
     setInterval(function() {
     $(".view-grid th:first a:first").trigger("click");
     }, 20000);
    });

     

    PS: Change the column trigger according to your requirements 

     

    Hope it helps.
    ------------

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

     

     

  • Pragatij Profile Picture
    44 on at

    Hi @ragavanrajan Thank you for your reply.. I tried the above approach mentioned by you.. But with this approach the grid pagination is breaking and the issue is intermittent some times pagination works and sometimes pagination is not at all visible.

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Could you remove the refresh part @Pragatij?

     

    Just try the code I have shared. It is equivalent to refreshing the grid and newly added data will be visible. 

     

     

    Hope it helps. 

     

    ------------

     

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

     

  • Pragatij Profile Picture
    44 on at

    Hi @ragavanrajan yes I tried the code which you have shared.. Its refreshing the subgrid properly but sometimes it is breaking the pagination of the grid.. pagination is not at all visible sometimes

  • ragavanrajan Profile Picture
    7,044 Most Valuable Professional on at

    Hi @Pragatij 

    Can you confirm the bootstrap version? 

     

    Check my article if you are struck 

    https://ragavanrajan.medium.com/how-to-check-the-bootstrap-version-in-power-pages-9d0ddbbea1d0

    Hope it helps. 

     

    ------------

     

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
DP_Prabh Profile Picture

DP_Prabh 41

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 31 Most Valuable Professional

#3
Hammed Profile Picture

Hammed 22

Last 30 days Overall leaderboard