title: Removing items from a observablecollection bound to a datagrid Silverlight?
body: <p>I am getting an error when deleting rows from an observablecollection which is bound to a datagrid in silverlight.</p>
  
  <blockquote>
    <p>System.NullReferenceException: Object reference not set to an instance of an object.at at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index) </p>
  </blockquote>
  
  <pre><code>if (GV.orderItemList.Contains(oOrdritem))
      GV.orderItemList.Remove(oOrdritem);
  </code></pre>
  
  <p>The first time, I delete a record, its working fine, the second time, it gives the above exception</p>
  
  <p><img src="https://i.stack.imgur.com/8FQZ4.png" alt="enter image description here"></p>
  
  <p>please please please help</p>