How to change the sort for every table on a webpage by clicking on the column heading of one table?
How to change the sort for every table on a webpage by clicking on the column heading of one table?
measterbro
Posts: 33Questions: 9Answers: 0
Any suggestions on how to change the sort for every table on a webpage by clicking on the column heading of one table? Here is a link to one of our pages:
http://citydynasty.com/Football/NFL/Standings/Opponent/2012-NFL-Standings-Versus-NFC-Teams.cshtml
If a user clicks on a column on any table is there a way to automatically sort the other tables by that same column?
This discussion has been closed.
Answers
Any suggestions?
You'll need to build a "set" of headers for each column, Maybe do this with a class for each column type. Apply that class for appropriate columns across all tables. Then use JQuery to bind to the onClick event of each class. When clicked, select all columns with that class and apply the sort API function.
Thank you for the information. Any chance of a JQuery example?