Tablebody gets empty when trying to sort

Tablebody gets empty when trying to sort

peipst9lkerpeipst9lker Posts: 11Questions: 0Answers: 0
edited April 2012 in General
Hi, I'm expieriencing a little bug causing my Table to get empty (Firebug showed an empty tbody) when trieng to sort for a column.
This bug exists since I removed the FixedHeader plug-in, I have ColReorder activated and when I move 1 column and sort afterwards it works without any problems. Also when the table gets empty, when I try to sort again it works. Error console is empty :/

My initialisation code
[code]
// dont sort headers with class "no_sort"
var dtSortCols = [];
$('.datatable thead th').each(function (){
if ($(this).hasClass('no_sort')) {
dtSortCols.push( { "bSortable": false } );
} else {
dtSortCols.push( null );
}
});

// datatables initialisation
var oTable = $('.datatable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"oLanguage": { "sUrl": "lang/de_DE/de_DE-datatables.txt" },
"aoColumns": dtSortCols,
"aLengthMenu": [[10, 25, 50, 100, 250, 500], [10, 25, 50, 100, 250, 500]],
"iDisplayLength": parseInt($("#entries_per_page").val()),
"sDom": 'RC<"clear"><"H"Tlfr>t<"F"ip>',
"bStateSave": true,
"oTableTools": {
"sSwfPath": "swf/copy_cvs_xls_pdf.swf",
"aButtons": [
{ "sExtends": "copy", "sButtonText": "Zwischenablage" },
{ "sExtends": "csv", "sButtonText": "CSV" },
{ "sExtends": "xls", "sButtonText": "Excel" },
{ "sExtends": "pdf", "sButtonText": "PDF" }
]
}
});
[/code]

Replies

  • peipst9lkerpeipst9lker Posts: 11Questions: 0Answers: 0
    Problem solved, the table had an ID which caused the sorting function to break.
This discussion has been closed.