Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Table Sorting with muticolumn header and body values using table sorter

My table header contains two row headers and i cannot able to sort the column after column containing colspan. My table structure as described in jsfiddle. I need to sort the last column in my table structure based on both headers Amount and Date/time. But i have no idea why it is not sorting. Any idea or suggestions might be helpful.

like image 371
Raji Avatar asked Aug 29 '12 06:08

Raji


1 Answers

Take a look at the sourcecode for tablesorter,

jquery.tablesorter.js">http://tablesorter.com/_jquery.tablesorter.js, particularly the function

function computeTableHeaderCellIndexes(t) for example..

Its trying to map columns to headers which will never work in your case - its just not designed to do what you're trying to get it to do...

You do have a slight bug in your structure, the second tr is missing a colspan="2"

like image 152
Stephen Avatar answered Oct 19 '22 04:10

Stephen