If I give 25 entries per page and click on last button,why it's scrolling down to the page?

If I give 25 entries per page and click on last button,why it's scrolling down to the page?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    Maybe I'm misunderstanding the problem description. If I set page length to 25 then scroll down to click the last page the page isn't moving. For example to do this I need to scroll down and the top five rows are scrolled off the top of the page. The sixth row is at the top of the webpage. I click last, the page doesn't move but I see 2 rows with the top row on the page being the sixth row.

    Are you seeing something different or am I misunderstanding the problem?

    Kevin

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    @kthorngren - Kevin, if you set per page at 25 and go to page 3, you end up way below the table. I assume that's the issue.

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    @tangerine. I understand. Depending on where the paging buttons are on the page the table may disappear. But I don't believe the page is scrolling. I guess a couple options are to use the page event and determine in the event if you want to scroll the page to the top of the table and use something like scrollIntoView(). Or maybe a fixed height solution as shown in this thread.

    Kevin

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    Thanks, but I don't actually have the problem. I was just trying to help the op.

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    I know :smile: I do the same to try and help threads along.

    Kevin

  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin
    Answer ✓

    The table is collapsing down since there are less rows to show. So the scroll position of the page stays the same, as Kevin said, but the page now has less on it to show - thus the effect you are seeing.

    I'd do as Kevin suggests if you don't want that - listen for page and then use jQuery to move the scrolling of the page back to the top of the table.

    Allan

This discussion has been closed.