DataTables, reinitialization of table does not work in IE8

DataTables, reinitialization of table does not work in IE8

rahulpprahulpp Posts: 6Questions: 1Answers: 0
edited August 2014 in Free community support

I have a very complex DataTable receiving data from different sources. I have a functionality where I want to destroy table and rebuild it..

I have following function for the same :

var reloadTable = function () {
       $("#medDataTable").dataTable().fnDestroy(); //destroy table
       $("#medDataTable").empty(); //empty DOM
       CreateTable(); //Reinitialize table
    }


var CreateTable = function(){
    $("#medDataTable").dataTable({
            "aaData": computeChartData(),
            "aoColumns": [
                    { "sClass": "my_class" }],
            "aoColumns": computeColumnData(),
            "bSortable": false,
            "bDestroy" : true,
            "bSort": false,
            "bFilter": false,
            "bInfo": false,
            "aaSorting": [],
            "aTargets": [1],
            "bSearchable": false,
            "bPaginate": false,
            "bAutoWidth": false,

            "sEmptyTable": "Loading data from server",
            fnInitComplete: function (oSettings) {
             //some init settings here
            }
        });
    }

which works on Chrome, Firefox, Safari and IE9+.. But when I try it on IE8 which is minimum requirement of our app, it throws this error :

"'asSorting' is null or not an object"

I tried all the solutions I could find online but couldn't get it working on IE8.. The problem persist on IE8 only. Nowhere else.

Any solution you know of?

This discussion has been closed.