Issue with the aButtons.

Issue with the aButtons.

dalli_29dalli_29 Posts: 3Questions: 0Answers: 0
edited October 2012 in DataTables 1.9
Hi Allan,

I have migrated our code from, 1.8. 2 to 1.9.4. I found an issue with 1.9.4 datatables. In one of the javascript pages we have the below code to create a print button:
"oTableTools": {
aButtons": [ { "sNewLine": "auto", "sExtends": "print", "sButtonText": "Print", "sInfo": "Print viewPlease use the print button to print this table. Use the return button when finished.", "fnInit": function(node){formatTableToolsButton(node, 'ui-icon-print');}, "sMessage": ""} ]
}
......
......
......

Now, as soon as I click on the print button, the preview opens up. I then clicked back on the return button, the initial screen is launched but all the dataTable functionalities like sort, search are not functioning any more. Kindly advise me if there is a work around or if it;s a bug which you would be fixing in the upcoming releases. If there is a workaround, kindly suggest what it is other wise I have no option than to switch back to the earlier version which is 1.8.2. I think this issue is existing from 1.9.1 on wards through 1.9.4. This happens only in IE8. Chrome and Mozilla are fine.

Thanks!
Dalli Kranthi

Replies

  • dalli_29dalli_29 Posts: 3Questions: 0Answers: 0
    Allan, I have the workaround as :
    commented the below line
    //$(o.nTable).children('thead, tfoot').remove();

    Added the below code to get rid of the issue that I described above.

    var nTheadSize = o.nTable.getElementsByTagName('thead');
    if ( nTheadSize.length > 0 )
    {
    o.nTable.removeChild( nTheadSize[0] );
    }

    var nTfootSize;
    if ( o.nTFoot !== null )
    {
    /* Remove the old minimised footer element in the cloned header */
    nTfootSize = o.nTable.getElementsByTagName('tfoot');
    if ( nTfootSize.length > 0 )
    {
    o.nTable.removeChild( nTfootSize[0] );
    }
    }
  • allanallan Posts: 63,395Questions: 1Answers: 10,451 Site admin
    Can you link me to a test case showing the problem please?

    Allan
This discussion has been closed.