title: Enumeration yielded no results
body: <p>I am trying to insert/update my table using the values in the <code>grid</code></p>
  
  <p><img src="https://i.stack.imgur.com/z1iMI.jpg" alt="enter image description here"></p>
  
  <p>Given below is the code I'm using to get the <code>productId</code> in the grid:</p>
  
  <pre><code>Dim prodId = From row As DataRow _
               In grdSale.Rows _
               Where row.Item(0).ToString &lt;&gt; "" _
               Select row.Item(0)
  </code></pre>
  
  <p>I am getting <code>productid</code> correctly. Given below is the code to get the value in <code>QTY</code> column with respect to the <code>productId</code>:</p>
  
  <pre><code>For Each id As Long In prodId
  
      Dim intpdt As Long
      intpdt = id
  
      intQty = (From row As DataRow In grdSale.Rows Where _
                row.Item(0).Equals(intpdt) _
                Select row.Item("QTY")).FirstOrDefault()
  
  Next
  </code></pre>
  
  <p>In <code>intQty</code> I am getting <code>0</code> but it should be <code>10</code> or <code>12</code> as you can see in the <code>QTY</code> column in the grid (<code>Enumeration yielded no results</code>).</p>
  
  <p>Where am wrong?</p>