Click here to Skip to main content
15,667,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to "sort" column/rows by clicking on "header text" on every page using c#, Jquery, asp dot net 2010.

What I have tried:

I was trying this code

You can see that when you click on "Ranking" header to sort - it results in 9 8 7 6 instead of 3 2 2 1

Please help to sort the individual column even if we click on "next" page or "Previous" page.
What modification should I do or is there any sample code available?

The original code I picked up is from here.

Kindly help,
Updated 18-Oct-21 11:51am
Member 15329613 18-Oct-21 13:01pm    
It is sorting on all records. Are you suggesting you want sorting only on what is showing? That could be a big problem.
ravitv 19-Oct-21 3:42am    
Yes Member 15329613, but Unipam has given a link below that solves it.

1 solution


Take a look here ->

I think it is what you are looking for.
Share this answer
ravitv 19-Oct-21 3:38am    
Exactly Yes Unipam, Thank you so much, but sorry for late reply.
It solves my problem.
Thanks again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900