DataTable Editor + paging always return to page 1 when button is pressed from other pages

DataTable Editor + paging always return to page 1 when button is pressed from other pages

fmeyer@nearbysoftware.comfmeyer@nearbysoftware.com Posts: 18Questions: 5Answers: 0

Hello Allan,
I have a weird issue with paging.
When I click on a button (either on the delete one, the edit or the cancel), the table loses the current page it was on and reverts to page 1. The user has to go back to the page index he was on to see the form.
See video attach starting at 00:28 : https://www30.zippyshare.com/v/AvUZqyxw/file.html
Any clue?
Thanks

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @fmeyer@nearbysoftware.com ,

    The video isn't loading I'm afraid, getting a 403. Could you link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • fmeyer@nearbysoftware.comfmeyer@nearbysoftware.com Posts: 18Questions: 5Answers: 0

    Damn. The video is loading correctly from here. Could you retry?
    Can I send it through other means?
    It was very well explaining the issue.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Still getting the 403. Try in a browser's 'private' mode. If no joy, yep, try sending by mail (colin@datatables.net), or share it with Dropbox or Google Photos/Drive perhaps.

  • fmeyer@nearbysoftware.comfmeyer@nearbysoftware.com Posts: 18Questions: 5Answers: 0

    This is weird. It works for me even in private mode.
    I've just sent you the video to your email.
    Thank you.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @fmeyer@nearbysoftware.com ,

    Thanks for that, I watched it and can see the problem, but there's a lot going on there - child rows, editing where the form is within the table, all of which could be causing a problem.

    Would you be able to link to your page (you can mail privately to avoid the forum)? Or if not, could you tweak this example here so that it's similar to your environment.

    Cheers,

    Colin

  • fmeyer@nearbysoftware.comfmeyer@nearbysoftware.com Posts: 18Questions: 5Answers: 0

    Well, that's not going to be easy and I won't have the time just now...

  • fmeyer@nearbysoftware.comfmeyer@nearbysoftware.com Posts: 18Questions: 5Answers: 0

    Will I be able to add Editor in to your example?
    Not sure I will as it is not free...

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin

    Yes, Editor is available in the libraries drop down list. Although it will only work with client-side table updating.

    Allan

  • fmeyer@nearbysoftware.comfmeyer@nearbysoftware.com Posts: 18Questions: 5Answers: 0

    Thanks Allan, I'll try then.
    Have you been, by any chance, able to see the attached video?
    Might ring a bell on your side, who knows...

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    The example I sent earlier has Editor setup - so that should give you a good starting point. He hasn't seen the video, I'll forward it on.

    C

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Answer ✓

    Looks like draw() is being called somewhere and that's resetting the paging. Without being able to see the code, I can't say for sure though.

    Assuming you are using draw() then pass in false as the first and only parameter to the method.

    Allan

  • fmeyer@nearbysoftware.comfmeyer@nearbysoftware.com Posts: 18Questions: 5Answers: 0

    Bingo!
    That was it.
    There were 2 calls to draw(), on needed that false boolean to stay on the current page.
    Brillant. And awesome support, as always.
    Thanks guys.

This discussion has been closed.