Is datatable supports print nested table?

Is datatable supports print nested table?

congthucphancongthucphan Posts: 2Questions: 1Answers: 0
edited February 2016 in Free community support

hi all,
I'm a newbie with datatable. Please let me say thank you for all of you, who has great job for building datatable lib and all supporters.
I'm using datable v.1.10.10, I can show nested table inside the parent table, but when print table (using button print of datatable),
seem it can't print the nested table. Instead, I will put all the field of nested table inside the <td> and print as a <td>.
I found the small of code in button.print.js

        html += '<tbody>';
        for ( var i=0, ien=data.body.length ; i<ien ; i++ ) {
            html += addRow( data.body[i], 'td' );
        }

but data.body[i] here is just plain text, not content html tags of nested table (e.g:

<

table><tr><td> like it has on UI).
Can I use any option to keep the format of nested table, and print it like as on UI?
Thank you in advance.

Answers

  • congthucphancongthucphan Posts: 2Questions: 1Answers: 0

    after a while researching, I found that I can do that by add and option for print button,

    \\some code
    exportOptions: {
          stripHtml: false
     }
    \\some code
    

    Thank all.

This discussion has been closed.