Hi I am new to jquery and trying to dynamically add row dynamically using the button from another datatable row.
Is there any easy way that using the row.add() function to create a row with button and input text like the below tr ?
<tr>
<td> <button type="button" class="btn green btn-xs select-row" data-id="7" data-includeTax="N">btn</button>
</td>
<td>1</td>
<td>2</td>
<td><input type="text" ></td>
<td>3</td>
im trying to call function similar to below on onclick event
saleDetailDT.row.add([..... ? ]).draw();
Maybe you are searching for something like:
Please see Add table row in jQuery
Try something like this:
And dont forget to give your table id="datatables" as below.