title: Filter Datatable with linq by considering deleted rows
body: <p>I have a following datatable -</p>
  
  <pre><code>static DataTable GetTable()
  {
    //
    // Here we create a DataTable with four columns.
    //
  DataTable table = new DataTable();
  table.Columns.Add("Dosage", typeof(int));
  table.Columns.Add("Drug", typeof(string));
  table.Columns.Add("Patient", typeof(string));
  table.Columns.Add("Date", typeof(DateTime));
  
  //
  // Here we add five DataRows.
  //
  table.Rows.Add(25, "Indocin", "David", DateTime.Now);
  table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
  table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
  table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
  table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
  return table;
  }
  </code></pre>
  
  <p>// taken from following link
  <a href="http://www.dotnetperls.com/datatable" rel="nofollow">http://www.dotnetperls.com/datatable</a></p>
  
  <p>On PageLoad I do the following code -</p>
  
  <pre><code>DataTable dt = GetTable();
  dt.AcceptChanges();
  dt.Rows[0].Delete();
  var t = dt.AsEnumerable().Where(dataRow =&gt; dataRow.Field&lt;string&gt;        ("Drug").Equals("Enebrel"));
  </code></pre>
  
  <p>It throws an error, that unable to get the data from deleted rows.</p>
  
  <p>Is there any way to filter tell linq that do not take into account deleted rows.</p>
  
  <p>Thanks,
  Daljit Singh</p>