Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page state is not retained while sorting a column #406

Closed
Velu-Narasimman opened this issue Dec 13, 2017 · 3 comments
Closed

Page state is not retained while sorting a column #406

Velu-Narasimman opened this issue Dec 13, 2017 · 3 comments

Comments

@Velu-Narasimman
Copy link

As discussed here, If there are 5 pages in my grid and I navigate to third page and sort a column, sorting goes well but the grid is reloaded and I am redirected to the first page of the grid instead of staying at the third page itself.

How to make the grid remain in the same page while doing sorting? Please help me on this.

@OlegKi
Copy link
Member

OlegKi commented Dec 13, 2017

Thanks for reminding about the problem. I'll examine it after I'll come back from the business trip.

First of all an addition information for other readers of the issue. The problem is specific for sorting of locally grouping data only and it's not an general string issue.

I think that I'll make some changes in the code of jqGrid to solve the problem, but I have to examine the problem more deep before.

OlegKi added a commit that referenced this issue Dec 18, 2017
add new `resetPageAfterSort` option to prevent resetting of page number during sorting. See [the issue #406](#406) for more details.
@OlegKi
Copy link
Member

OlegKi commented Dec 19, 2017

I could not find any good solution and then just added new option resetPageAfterSort, which could be used to prevent resetting of the page number to 1. The demo https://jsfiddle.net/92da8xhq/6/ uses the latest code from GitHub and the option resetPageAfterSort: false. I think the demo works like you expect.

@OlegKi
Copy link
Member

OlegKi commented Jan 3, 2018

The problem is solved and I'm closing the issue.

@Velu-Narasimman Please think about closing the issues in the future. I find better if the person, who reports the issue, close it.

@OlegKi OlegKi closed this as completed Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants