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

Community site session details

Session Id : jwRSaqIgf7PNGIa3H4Tryo
Power Pages - General Discussions
Answered

Not able to refresh Subgrid on Power Pages form

Like (0) ShareShare
ReportReport
Posted on 19 Feb 2024 07:06:08 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 19 Feb 2024 at 15:08:23
    Re: Not able to refresh Subgrid on Power Pages form

    @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 20 Feb 2024 at 09:08:04
    Re: Not able to refresh Subgrid on Power Pages form

    @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 20 Feb 2024 at 11:26:42
    Re: Not able to refresh Subgrid on Power Pages form

    @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 26 Feb 2024 at 10:06:56
    Re: Not able to refresh Subgrid on Power Pages form

    @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,036 Most Valuable Professional on 26 Feb 2024 at 10:24:52
    Re: Not able to refresh Subgrid on Power Pages form

    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 26 Feb 2024 at 11:34:47
    Re: Not able to refresh Subgrid on Power Pages form

    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,036 Most Valuable Professional on 26 Feb 2024 at 17:55:02
    Re: Not able to refresh Subgrid on Power Pages form

    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 29 Feb 2024 at 06:48:42
    Re: Not able to refresh Subgrid on Power Pages form

    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,036 Most Valuable Professional on 29 Feb 2024 at 08:46:52
    Re: Not able to refresh Subgrid on Power Pages form

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 46 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 43 Super User 2025 Season 2

#3
Jerry-IN Profile Picture

Jerry-IN 38

Last 30 days Overall leaderboard
Loading started
Loading complete