Sorting bug/error Chrome Specific need work around
Sorting bug/error Chrome Specific need work around
monkeytooth
Posts: 22Questions: 0Answers: 0
Ok I have been tryin to find an answer for a couple days, can't seem to find it, however to save my self some time on retyping it all out I will just share my link from stackover flow. If you'd be so nice to just check it out, if your able to help me any which way, please. Thank you
http://stackoverflow.com/questions/10238240/jquery-datatable-sorting-bug-error-chrome-specific-need-work-around
http://stackoverflow.com/questions/10238240/jquery-datatable-sorting-bug-error-chrome-specific-need-work-around
This discussion has been closed.
Replies
Can you link to a test case showing the problem so I can run it in Chrome here and discover what is going wrong with it?
Thanks,
Allan
Along with the source for that particular table as far as the javascript is concerned at least
Allan
http://debug.datatables.net/etekog
Allan
What it is is 5 columns 2 hidden so..
0 is the column with the inital sort issue that sparked this post.
1 is supposed to be display purpose only
2 is hidden and is supposed to act as the sort for 1
3 is supposed to be display purpose only
4 is hidden and supposed to act as the sort for 3
Now I have no idea exactly how to say what it does when I try to do fix it but every way I shift it around, or redo it seems to fail for me..
This is the inital block of "aoColumns[ ]"
null,
{"iDataSort": 2, "bSortable": true},
{"bVisible": true, "sType": "num"},
{"iDataSort": 4, "bSortable": true},
{"bVisible": true, "sType": "num"}
ive tried to take null off and sType to HTML, ive tried to mix and match the above a few different ways
even tried just
{ "sType": "html", "bSortable": true},
{ "sType": "num", "bSortable": true},
{ "sType": "num", "bSortable": true}
(before I realized I had 2 hidden columns) Which this worked but broke the table layout physically. So now Im stuck trying to go from a to b keeping all 5 columns the 3 displayed, and the 2 hidden and failing
Links just below the Download button for 1.9: http://datatables.net/download ! :-)
> Also curious, is there anything I can consider looking at api/option wise that may help me adjust the sorting, so it stops the HTML inclusion in the sort?
DataTables should do that automatically. However, from your following comments it sounds like you want a numeric sort with HTML data. For that you currently need to use a plug-in:
http://datatables.net/plug-ins/sorting#numbers_html
http://datatables.net/plug-ins/type-detection#numbers_html
Allan