title: Removing certain row from datatable C#
body: <p>I am trying to remove rows from datatable in which a certain cell is empty. I have tried using for loop but to no avail.</p>
  <pre><code>for (int i = dtbl.Rows.Count - 1; i &gt;= 0; i--)
          {
             DataRow dr = dtbl.Rows[i];
              if (dr[&quot;id&quot;] == null)
                 dtbl.Rows.Remove(dr);
          }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/pM5LF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pM5LF.png" alt="enter image description here" /></a></p>
  <p>If the cell of ID column is empty, then that row should be deleted.
  Any help is appreciated. Thanks in advance.</p>