title: Error: no row found in -[TiUITableViewProxy insertRowBefore:]
body: <p>I have a tableview which contains data fetched from sqlite. I am able to delete a record by setting editing to true. </p>
  
  <p>I want to check some condition before deleting the row. If the condition is true, the row is deleted, however when the condition is false, I'm getting the following error:</p>
  
  <blockquote>
    <p>no row found for index. in -[TiUITableViewProxy insertRowBefore:] (TiUITableViewProxy.m:500)</p>
  </blockquote>
  
  <h1>Controller</h1>
  
  <pre><code>table.addEventListener('delete', function(e) {
      if(some condition){
          db.execute("DELETE FROM tbltest WHERE rowid ='" + e.source.rowid + "'");
      } else {
          alert('Deletion is not possible');
          table.insertRowBefore(e.index, e.row);
      }
  }
  </code></pre>
  
  <p>Any ideas?</p>