Removing a tagname in child row

Removing a tagname in child row

volkanbozvolkanboz Posts: 1Questions: 1Answers: 0

Hello,

I'm using the display of row details feature explained here: https://datatables.net/examples/api/row_details.html

In the html of the child row, i would like to remove the tag name 'td'.

My code is like this

function format(){
return '<p>Test...</p>';
}

$('#demoServerTable tbody').on('click', 'tr td.details-control', function () {
     var tr = $(this).closest('tr');
     var row = dt.row(tr);
     row.child(format()).show();   //Calling the function format()
}

the display of the html is:

<tr role="row" class="odd shown">
        <td>1</td>
        <td class=" details-control"></td>
        <td class="sorting_1">test</td>
</tr>
<tr>
   <td colspan="8"> 
         <p>Working...</p>
   </td>
</tr>

This is the result that i would like to have (removing the <td colspan="8">)

<tr role="row" class="odd shown">
        <td>1</td>
        <td class=" details-control"></td>
        <td class="sorting_1">test</td>
</tr>
<tr>
        <p>Test...</p>        //I would like to remove the td
</tr>

Do you think that it's possible?

Thank you in advance,
Volkan

This discussion has been closed.