How can I using JQuery sort any column of gridview at client side? Kindly share...
+1
A:
Check this article may help you :
Pranay Rana
2010-10-27 09:44:30
@Pranay I want to sort the tables at the client side itself without doing any post-back or any communication with the server.
HotTester
2010-10-27 09:55:36
@HotTester - as per your question you asked for the gridview control and this article are related to that only
Pranay Rana
2010-10-27 10:07:25
@Pranay thanks... i was missing some key points... thanks for ur help
HotTester
2010-10-27 10:21:58
@HotTester - yep, it's just a table, all you have to do is disable the default ASP.Net sorting, let it render as *just* table.
Nick Craver
2010-10-27 09:55:53
Can you share the code for the same... for it is not running the way you are saying... thanks...
HotTester
2010-10-27 10:12:53
@HotTester -I'm not following *what* isn't working? All you have to do is call `$("#tableId").tablesorter();` inside a `document.ready` handler, there's no other setup.
Nick Craver
2010-10-27 10:18:40
Thanks @Nick ... i got it... actually gridview by default does not render the tbody tag that is needed for the tablesorter. I just added GridView1.UseAccessibleHeader = true; GridView1.HeaderRow.TableSection = TableRowSection.TableHeader; GridView1.FooterRow.TableSection = TableRowSection.TableFooter;
HotTester
2010-10-27 10:21:03