I am getting an error when deleting rows from an observablecollection which is bound to a datagrid in silverlight.
System.NullReferenceException: Object reference not set to an instance of an object.at at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
if (GV.orderItemList.Contains(oOrdritem))
GV.orderItemList.Remove(oOrdritem);
The first time, I delete a record, its working fine, the second time, it gives the above exception

please please please help
I sorted the problem using the code below:
The row which was currently focused was still in edit mode which was causing the exception.