title: Deleting a Row from JQuery Datatables
body: <p>Hi I am deleting the row from the table using <code>fnDeleteRow</code> function but the problem is that it deletes the correct row for the first time only and than start deleting the next row instead of that for which I am pressing the delete button.</p>
  
  <p><strong>here is my code</strong></p>
  
  <pre><code>$(document).ready(function() {
          $(document).delegate('.but', 'click', function() { 
  
              var id = this.id; //getting the ID of the pressed button
              var name = this.name; //getting the name of the pressed button
  
              /****AJAX Function*********/
              $.post('/products/delete', {id:id}, function(data) {
                  if(data == 1){ //In case if data is deleted
  
                      var oTable = $('#table_id').dataTable(); // JQuery dataTable function to delete the row from the table
                      oTable.fnDeleteRow( parseInt(name, 10) );// JQuery dataTable function to delete the row from the table
                    //  oTable.fnDraw(true);
  
  
  
                 }
                  else
                      alert(data);
              });
          });
      });
  </code></pre>
  
  <p><code>this.name</code>     gives the row number of the row associated with the pressed button as I don't know any method to calculate the rowIndex dynamically from the dataTable.</p>
  
  <p>As I calculate the row number on the server side and associate that number with the button, so when I delete the row datatable rearranges its rowIndex on client side and server does not know any thing regard this.</p>
  
  <p>Any help to resolve this issue.</p>