Base solution for your next web application
Open Closed

Angular 4 version -JTable keep page after table is refreshed #3443


User avatar
0
joe704la created

I have a situation where a user can update a status from the Jtable and if they are on any other page but 1 then when the table refreshes after the update. It takes them back to page 1.

Is there away to pass the page number back to the jtable when it is reloading after a status update?


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Just include skipCount parameter to your request parameters. For example.

    $('#PersonTable').jtable('load', { Name: 'John', skipCount: 20 });
    
  • User Avatar
    0
    joe704la created

    I got this kinda working. The issue I am now having is the paging number on the bottom when I reload the table defaults back to 1 even though it is actually on what ever page it is supposed to be on.

    So for example, I am on page 12. I update the status of one of the rows, the table reloads using that page 12. But the bottom left page result goes back to 1 even though the results are at page 12. Hope that makes sense.

    But if I page using the navigation at the bottom of the table then it displays correctly.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sorry, I think I missguided you. Can you try it with reload method ? <a class="postlink" href="http://www.jtable.org/ApiReference/Methods#met-reload">http://www.jtable.org/ApiReference/Methods#met-reload</a>.

    It should stay at the same page after refresh.

    Thanks.

  • User Avatar
    0
    joe704la created

    That is perfect. Thank you. Not sure how I missed that. I went through the documentation for a few hours one day. Must have just glanced over that part.