I’m having strange results when using this two fellows because it only sort the page is viewing and I need to sort across pagination as well. Second, when the pagination numbers appear the asc and desc effects put the numbers on top or at the bottom. And last but not least, the grid is inside an updatepanel and when I try to click for a second time the header for sorting nothing happens, only if I press the shift button.
Share
Is the pagination happening client-side or server-side? It sounds like it’s server-side. If that’s the case, then the jQuery plugin can’t sort anything more than what’s on the page, because from the perspective of JavaScript (which is client-side) there are no other records than the ones on the page.
Are the numbers in table cells like the rest of the table? Are they differentiated from the other rows in any way? It sounds like the jQuery plugin is just sorting the table, regardless of the table’s contents. The server-side code which is rendering the table has no knowledge of the jQuery plugin and has no intention of catering to it.
For the more dynamic client-side table manipulation that you’re looking for, I highly recommend using something like jqGrid. It internally handles things like paging and sorting, so you wouldn’t have to worry about reconciling your client-side and server-side code manually between otherwise mutually exclusive plugins/controls/frameworks.
It’s a fairly significant shift from using server-side grid controls, so don’t think of it as a drop-in replacement. But being able to effectively use it will give you a lot of options for AJAX-friendly client-side interactions. The main thing to keep in mind is to have a clear line of separation between the server-side code and the client-side code. Have a separate server-side handler for responding to AJAX requests and treat it like a “web service” used by the client-side JavaScript.