DataTables complex header example (row and colspans) - Only two columns sortable
DataTables complex header example (row and colspans) - Only two columns sortable
![dimeg](https://secure.gravatar.com/avatar/747e680afc2d4c38a55e3ab713aa62ce/?default=https%3A%2F%2Fvanillicon.com%2F747e680afc2d4c38a55e3ab713aa62ce_200.png&rating=g&size=120)
Something wrong with sorting if I use "colspan" in header. Only 2 first columns can be sortable.
I found that in your example page: http://datatables.net/examples/advanced_init/complex_header.html same problem exists.
But in this example: http://datatables.net/1.5-beta/examples/advanced_init/complex_header.html everything seems to be ok.
Tested in "Safari 4.0.2 (5530.19)" and "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13".
What is wrong here?
I found that in your example page: http://datatables.net/examples/advanced_init/complex_header.html same problem exists.
But in this example: http://datatables.net/1.5-beta/examples/advanced_init/complex_header.html everything seems to be ok.
Tested in "Safari 4.0.2 (5530.19)" and "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13".
What is wrong here?
This discussion has been closed.
Replies
Unfortunately you've found a bug in DataTables :-( (although - a different way of looking at it is: you've found a bug in DataTables :-) ... ;-) ). The problem is that, annoyingly, 1.5.0 introduce a bug into the code which DataTables uses to detect "unique" TH elements in the header (for the column). I've got this fixed in my development version and will have this released soon as 1.5.1 (just checked what else needs to go in to make it a good release!
You can fix this issue by locating the following code in 1.5.0:
[code]
for ( i=0, iLen=aLayout.length ; i