Click here to Skip to main content
16,012,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.
I got an error in the log file while testing the website . can u please tell me the solution for this issue..
Posted
Updated 11-Jan-13 4:37am
v2

Here similar issue discussed and resolved: here[^]

Overall, it says:
According to the exception, it seems that you try to read a row which has been deleted already.

So I think some logic should be added to avoid this.
1. check if the target row is existed ;
2. When it is existed, do something.
 
Share this answer
 
I was also getting the same error with my code

This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row.

How ever i was binding datagridview with table using linq..

I change my code to
<pre lang="c#">
var qry = from si in tempdset.ItemSuppliers.AsEnumerable()
          where si.itemid == Convert.ToInt32(cmbSuppItem.SelectedValue.ToString())
          select si;
DataGridview1.DataSource = qry.AsDataView();


from
XML
<pre><pre lang="c#">
var qry = from si in tempdset.ItemSuppliers.AsEnumerable()
          where si.itemid == Convert.ToInt32(cmbSuppItem.SelectedValue.ToString())
          select si;
DataGridview1.DataSource = qry.ToList();
</pre></pre>


where,
temdset is a DataSet and ItemSuppliers is table name.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900