jQuery DataTable : Delete row and reload
<p>Now, I am working with jQuery DataTable. Everything is going well in intializing data tables with javascript data array.</p>

<p>In my table, it included remove row button. When I clicked the <strong>Remove</strong> button of each row, I delete record using following function.</p>

<pre><code>function removeRow(itemList, recordIndex){
    itemList.splice(recordIndex, 1);

    dataTable.clear();
    dataTable.rows.add(itemList);
    dataTable.columns.adjust().draw(false);
}
</code></pre>

<p>This function performed well with no error. At that, I set <strong>false</strong> to <code>draw()</code> function to prevent going to first page when delete records in any other page.This one also working for me. </p>

<p>The problem is, when my <code>itemList</code> has <strong>11</strong> records, and I go to <strong>second page of data table and delete the 11th record</strong>.</p>

<p>So, my <code>itemList</code> will left only 10 record and My data table should show the <strong>first</strong> page of paging.</p>

<p>But, jQuery data table is not doing that. It still have in <strong>second page</strong> with <strong>no records</strong>.</p>

<p>I don't know how to fix that one. I want to show previous page after delete every records from current page.</p>

<p>I know <strong>`draw()``</strong> function without <strong>false</strong> parameter will go to first page. But it go to first page in every deletion.</p>

<p><strong>I only want to go to previous page, when I deleted all records from current page.</strong></p>

<p>Please, help me. Thanks.</p>