{"id":6248,"date":"2014-04-14T03:22:46","date_gmt":"2014-04-14T03:22:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/14\/exception-datatable-internal-index-is-corrupted-5-on-collection-of-common-programming-errors\/"},"modified":"2014-04-14T03:22:46","modified_gmt":"2014-04-14T03:22:46","slug":"exception-datatable-internal-index-is-corrupted-5-on-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/14\/exception-datatable-internal-index-is-corrupted-5-on-collection-of-common-programming-errors\/","title":{"rendered":"Exception: DataTable internal index is corrupted: &#39;5&#39;. on &#8230;-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn<\/p>\n<p>\u00a0\u00a0\u00a0 Hi, I have a problem with bindingsource component in framework 2.0.<\/p>\n<p>I have a combobox bound to a bindingsource which is also bound to a dataset with 2 related tables and a datagridview bound to the same bindingsource. What I want to do is : When the selectedindex property of my combobox changes, the corresponding cell value must be changed in the datagridview. But although the value in bindingsource changes, datagridview does not display the new value. That value is displayed after\u00a0I move the mouse over that cell and make it invalidate its region manually.<\/p>\n<p>Another error I caught is the one that you can see as the subject of my post. I do not know why i have that message when I try to change the property of ((DataRowView)mybindingsource.Current)[&#8220;MyProperty&#8221;] programmatically.<\/p>\n<p>I will be grateful if someone can help me.<\/p>\n<\/li>\n<li>\n<h3>132 Answers<\/h3>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn1<\/p>\n<p>Post a code example for\u00a0the internal index is corrupted issue, this sounds like a bug.<\/p>\n<p>Sorry I can&#8217;t help you on the binding issue.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn2<\/p>\n<p>Hi Matt,<\/p>\n<p>I have the same problem.<\/p>\n<p>I have a typed dataset and sometimes, I don&#8217;t know why, when I want to select some information in a DataTable and show (no Databinding) some information on my webpage I get this error.<\/p>\n<p>Here is the exact exception :<\/p>\n<p>StackTrace : Source: System.DataMethode: RBInsertMessage: DataTable internal index is corrupted: &#8216;5&#8217;.StackTrace : at System.Data.RBTree`1.RBInsert(Int32 root_id, Int32 x_id, Int32 position)at System.Data.RBTree`1.RBInsert(Int32 root_id, Int32 x_id, Int32 position)at System.Data.Index.InitRecords(IFilter filter)at System.Data.Index..ctor(DataTable table, Int32[] ndexDesc, IndexField[] indexFields, DataViewRowState recordStates, IFilter rowFilter)at System.Data.Select.CreateIndex()at System.Data.Select.SelectRows()at System.Data.DataTable.Select(String filterExpression)<\/p>\n<p>at Composants_Publicite.Afficher()<\/p>\n<p>It can work for many days and then I suddenly get this exception.<\/p>\n<p>I can send you some code but I can&#8217;t post it here due to security reason.<\/p>\n<p>Thx for your help.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn3<\/p>\n<p>I&#8217;ll check with the devs to see if they&#8217;ve heard of this one yet.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn4<\/p>\n<p>We have a bug filed on this but we have not narrowed down a way to reproduce this yet.\u00a0\u00a0 Could you reply to me with some information on how you manipulate this DataTable?<\/p>\n<p>For example are you modifying this DataTable from multiple threads concurrently?\u00a0<br \/>\nIt is possible that this could corrupt it.\u00a0 According to the devs:<\/p>\n<p>The internal index is corrupted &#8220;5&#8221; message typically gets thrown when 2 or more rows end with the same row id.<\/p>\n<p>This is a problem for DataTable because the row id should always be unique.<\/p>\n<p>So I theorize if 2 threads simultaneously add rows to the DataTable this could cause the corruption.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn5<\/p>\n<p>Yes It could be the problem.<\/p>\n<p>My DataSet is stored on the Application Cache\u00a0and every user can potentialy access and, sometimes, modify the content of a row.<\/p>\n<p>But I had another exception telling that I cannot modify the same row at the same time. Now I modify it in order that the DataSet is now read only and I have no more exception on this DataSet.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn6<\/p>\n<p>after I red this thread I&#8217;m sure it is a bug in .NET framwork 2.0. I discoverd this exception several times in different applications. but yet I was unable to reproduce it while debugging \ud83d\ude41<\/p>\n<p>.. and it could not be a threading problem, having two thread inserting data, because I do not user different threads on that DataSet.<\/p>\n<p>any news on it from MS ?<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn7<\/p>\n<p>We&#8217;re still looking for a repro.\u00a0 So if anyone out there has a repro please post it here.<\/p>\n<p>Also if you have some code that reproduces it but not consistently post this too.<\/p>\n<p>Anything that could help us figure out how to reproduce would be good, thanks for all your help thus far folks!<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn8<\/p>\n<p>Note someone forwarded one repro to me thus far and it turns out that this one was caused by multi-threaded access to the DataTable.<\/p>\n<p>So key thing for everyone to note.\u00a0 If you modify a DataTable on multiple threads, you can corrupt the indexes on it and this is by design.\u00a0 The DataTable is not designed to be thread safe for modifications\u00a0for performance reasons.\u00a0 So to resolve this you need to use the lock statement around all modifications to DataTable.<\/p>\n<p>Modifications include:<\/p>\n<p>1. Adding, deleting, modifying\u00a0rows\u00a0in DataTable.<\/p>\n<p>2. Selecting rows using Select method on DataTable (yes, this can\u00a0modify the DataTable by creating a new index on it).<\/p>\n<p>3. Creating DataViews over a DataTable (same as #2, this can cause a new index to be created on DataTable).<\/p>\n<p>4. Modifying Sort property.<\/p>\n<p>I am sure there are some others I missed.\u00a0 In general using the same DataTable on multiple threads is tricky business unless you restrict DataTable to100% read only operations (like enumerating rows and reading values).<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn9<\/p>\n<p>I am 100% sure, that this bug has nothing to do with multiple-thread. Our users ran into the bug several times a day. Now I implemented the following work-around:<\/p>\n<p>&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>dt.Clear()Me.Owner.DbConnector.FillDataAdapter(da, dt)<\/p>\n<p>.SuspendBinding()<\/p>\n<p>Table.BeginLoadData()<\/p>\n<p>Table.DataSet.Merge(dt, False, MissingSchemaAction.Add)<\/p>\n<p>Table.EndLoadData()<\/p>\n<p>.ResumeBinding()<\/p>\n<p>&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>I added the red-maked-code to the method where I do the .Reload of my DataSet. (The same Code is used after saving the Table.)<\/p>\n<p>On the side of the user-code I do not change anything. Just using NewRow and Rows.Add. &#8211; what caused the corrupted: &#8216;5&#8217; Error before. <strong>And now the error is gone.<\/strong><\/p>\n<p>&#8216; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>Dim<\/p>\n<p>NewRow As DataRow = Me.Table.NewRow<\/p>\n<p>&#8230;<\/p>\n<p>Me<\/p>\n<p>.Table.Rows.Add(NewRow)<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn10<\/p>\n<p>I am getting this same &#8220;data table internal index is corrupt &#8216;5&#8217;&#8221; error when trying to update a row using one of the table adapters I created with a data source in VS 2005.\u00a0 This code has been working without problems for months.\u00a0 The error occurs about 30% of the time.\u00a0 Here is an example of the code I am using:<\/p>\n<p>DataRowView rv = (DataRowView)myBindinfSource.Current;<\/p>\n<p>myDataSource.myTableDataRow row = (myDataSource.myTableDataRow)rv.Row;<\/p>\n<p>row.ID = 12;<\/p>\n<p>int updated = mtTableTableAdapter.Update(row);<\/p>\n<p>myDataSource.AcceptChanges();<\/p>\n<p>Does anyone at least know of any work arounds?<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn11<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn12<\/p>\n<p>I have tried using the Begin\/EndLoadData as well as the Suspend\/ResumeBinding tricks to try to get this to work but this error keeps rearing its&#8217; ugly head&#8230;still only sometimes though.\u00a0 I really wish I could find more information regarding why this could be happening.\u00a0 I am not using threads at all&#8230;..<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn13<\/p>\n<p>I seem to be able to reproduce this fairly consistently. I&#8217;m handling the CurrentItemChanged event on the binding source and using that to detect changes to one column that need to be propogated to others. Whenever I set a value against a column using the binding source Current property to access the DataRowView I get this exception.<\/p>\n<p>I&#8217;ve tried all the work arounds, but none seem to work. It doesn&#8217;t seem to matter which event I connect to from the binding source, they all seem to throw this exception if I try to change the underlying data.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn14<\/p>\n<p>Could you post a repro so I can get this to the dev who owns the bug?<\/p>\n<p>Thanks!<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn15<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0 To reproduce it :<\/p>\n<p>1) Load a datatable with a dataadapter<\/p>\n<p>2) modify a data and save it to the database &#8220;without&#8221; closing the form and then modify the data again and save to the database again<\/p>\n<p>3) That&#8217;s all<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn16<\/p>\n<p>We found a consistent way to reproduce this:<\/p>\n<p>using Asp.Net:<\/p>\n<p>&#8211; use a DataTable and store it in the cache<\/p>\n<p>&#8211; Create a DataView on the table<\/p>\n<p>&#8211; Bind a control to the DataView (this step is not necessary I think)<\/p>\n<p>&#8211; stress test the web page, sending multiple http requests at the same time.<\/p>\n<p>Very soon the error will start to appear.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn17<\/p>\n<p>Yes, this goes back to my original theory.<\/p>\n<p>A\u00a0DataTable is thread safe for read operations but not for write operations.<\/p>\n<p>So this means you can store a DataTable in the cache and extract it and use it in a read only fashion and it will work fine.<\/p>\n<p>However, creating a DataView on a DataTable is a write operation on a DataTable.\u00a0 Most people don&#8217;t know this, and its not\u00a0very intuitive so I don&#8217;t blame them for not knowing this.<\/p>\n<p>What happens when you create a DataView on a DataTable is the DataView will create an index on the DataTable and this index is stored in the DataTable.\u00a0 The reason for this is performance, for example if you create a DataView saying &#8220;F1=1&#8221; as the criteria, this creates an internal index on the DataTable to locate this information.\u00a0 Later on if you create another DataView with the same criteria, the index is reused, so this improves performance.\u00a0\u00a0 However the fact that these indexes are stored inside the DataTable means that these are write operations to the DataTable and thus they are not thread safe.<\/p>\n<p>So if you are creating random DataViews on the DataTable you are constantly creating new indexes.\u00a0 If you are creating the same type of DataView over and over you are constantly reusing existing index.<\/p>\n<p>So unfortunately you need to serialize the creating of DataViews over the DataTable.<\/p>\n<p>You could do this for example to avoid the problem:<\/p>\n<p>lock(myDataTableFromCache)<\/p>\n<p>{<\/p>\n<p>dv = new DataView(myDataTableFromCache,&#8230;);<\/p>\n<p>}<\/p>\n<p>So lock\u00a0using the DataTable as the locking object and lock when creating the DataView should solve the problem.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn18<\/p>\n<p>OK, I met this error as well but in bit different circumstances&#8230;<\/p>\n<p>I have 2 tables in my dataset (loaded from xml file).<\/p>\n<p>I have 2 DataGridViews which are bound to 2 BindingSources respectively.<\/p>\n<p>my user\u00a0need to be able to move a line from\u00a0DataGridView A to DataGridView\u00a0B and back.<\/p>\n<p>In my code\u00a0I create new row of Table B, fills it with values from line\u00a0aa of DataGridView A, add the row to table B and delete the line aa from DataGridView A.<\/p>\n<p>When moving line from DataGridView\u00a0B to DataGridView\u00a0A I do the same just the in opposite direction.<\/p>\n<p>I get the error after doing several move like described on the same line.<\/p>\n<p>A-&gt;B, B-&gt;A, A-&gt;B and get the error on this line:<\/p>\n<p>Me.Ds.dtB.Rows.Add(NewRow)<\/p>\n<p>and the weirdest thing is that when I surround the code with &#8220;try catch&#8221; &#8211; I saw the error in a messagebox but the line did enter Table B and DataGridView B !!!!!!!!!!<\/p>\n<p>When tried to move it back to DataGridView A &#8211;\u00a0I got the same error again but this time an empty row has been added to table A and DataGridView A.<\/p>\n<p>Hope this help a little and that a solution is on the way&#8230;<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn19<\/p>\n<p>Sorry to burst your bubble on this, but I have a reproduction scenario on this which does not have anything to do with threading. It seems to have to do with expression field updating using the CHILD() expression function.<\/p>\n<p>I will post a code sample as soon as I can isolate one.<\/p>\n<p>Andy<\/p>\n<p>Another Item &#8211; if I use the lock statement to lock the row I&#8217;m operating on, then the code works fine. Are expression evaluations performed out of band on a different thread???<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn20<\/p>\n<p>Awesome, if you can get me the repro code I can give it straight to the dev that wrote the DataSet and we can get this fixed.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn21<\/p>\n<p>To correct my prior statements, the lock keyword did NOT work reliability. However, as this is a sometimes works\/sometimes doesn&#8217;t problem, I would suspect a race condition.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn22<\/p>\n<p>Note as a follow up I talked to the DataSet gurus and they indicated that with .NET 2.0 creating DataView is now protected by internal locks so in theory there is no need to syncrhonized creating DataViews over a DataSet with .NET 2.0.<\/p>\n<p>Still looking for a repro for this one.\u00a0 I put together some test code on my own to stress multi-threaded DataView creation and could not reproduce any failures.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn23<\/p>\n<p>Any ideas on a similar error (&#8217;13&#8217; instead of &#8216;5&#8217;):<\/p>\n<p>System.InvalidOperationException: DataTable internal index is corrupted: &#8217;13&#8217;. at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) at System.Data.Index.GetRows(Range range) at System.Data.Index.GetRows(Object[] values) at System.Data.DataRelation.GetChildRows(DataKey parentKey, DataKey childKey, DataRow parentRow, DataRowVersion version) at System.Data.DataRow.GetChildRows(DataRelation relation, DataRowVersion version) at System.Data.DataRow.GetChildRows(DataRelation relation) at Store24.Store24Lib.ScrubProductsTable(DataRelation relation, String exclCategories, String[] productExcludeArray) in C:\\Documents and Settings\\chrwil\\My Documents\\Visual Studio 2005\\Projects\\Store24.2\\Store24.2\\Store24.cs:line 1956\u00a0\u00a0<\/p>\n<pre>private static void ScrubProductsTable(DataRelation relation, string exclCategories, string[] productExcludeArray)\n{\n    foreach (DataRow parentDataRow in relation.ParentTable.Rows)\n    {\n        bool allProdsDeleted = ScrubProductsTable(parentDataRow.GetChildRows(relation), exclCategories, productExcludeArray);\n\n        if (allProdsDeleted)\n        {\n            parentDataRow.Delete();   \/\/ No children so kill parent\n        }\n    }\n}\n\nprivate static bool ScrubProductsTable(DataRow[] dataRows, string exclCategories, string[] productExcludeArray)\n{\n    bool allProdsDeleted = true;   \/\/ Return value At least 1 row remains\n\n    foreach (DataRow mDataRow in dataRows)\n    {\n        if (exclCategories.Contains((string)mDataRow[\"sales_category_id\"]) || \n            Array.BinarySearch(productExcludeArray, mDataRow[\"product_id\"]) &gt;= 0)\n        {\n            mDataRow.Delete();\n        }\n        else\n        {\n            allProdsDeleted = false;   \/\/ At least 1 child row remains so do not delete parent\n        }\n    }\n\n    return (allProdsDeleted);\n}\n\n<\/pre>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn24<\/p>\n<p>I think the problem was that the DataTable was in a DataSet that was in cache. Perhaps another user was doing the same thing with the same DataSet at the same time. I need to make a copy of the object before deleting rows from it.<\/p>\n<p>GarDavis<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn25<\/p>\n<p>Yes this is very possible.\u00a0 I know a few years ago I was working with a customer who was using DataSet as a cache of data and one thing we did to avoid issues was implement a &#8220;copy on write&#8221; scheme.\u00a0 So you setup some code where if the caller wants to modify the DataSet they call a special function to get a copy and then modify the copy and when the modification is finished the writer copies over the older copy.\u00a0<\/p>\n<p>The writer &#8220;checks out&#8221; a copy, modifies the copy, then &#8220;checks in&#8221; the new copy.<\/p>\n<p>Readers always get a static copy since the assignment of a DataSet to a variable is atomic.\u00a0 The only special case scenario you had to watch out for was multiple concurrent writers (we just used a global lock to handle this because writes were relatively rare).<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn26<\/p>\n<p>We found that we received this exception due to side effects of BindingManagerBase.EndCurrentEdit\u00a0that caused a second nested call to EndCurrentEdit OR SuspendBinding.\u00a0 This was due to the way we save our data to the database in our UI and we were able to code around it.\u00a0 The exception never occured in 1.1 of the framework however.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn27 Any news about this issue?I&#8217;ve got the same problem with a multithreaded application. Unfortunately locking is no option because the app is performance critical. In my humble opinion it&#8217;s a shame that such an essential data type is not working properly for months. This situation is typical for MS, this bug is apparent for months and nothing satisfying happened. You folk&#8217;s should release the source code, surely somebody would fix this problem for you before you do.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn28<\/p>\n<p>I discoverd that this bug only appears if the Defaultview.Sort property has been set and a Column-Value wich belongs to .Sort will be changed. The Exception occured every 10-20 Row-Changes to a Col (included in .Sort).<\/p>\n<p>After I eleminated the Sort (now\u00a0I load the records from SQL Server in order), the exception does not appear any more.<\/p>\n<p>Maybe this helps you to find the bug.\u00a0more info\u00a0needed, please dont hesitate contacting me.<\/p>\n<p>\u00a0&#8216; &#8212; Code Segment &#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Private Sub FlexGrid_CellChanged(ByVal sender As Object, ByVal e As C1.Win.C1FlexGrid.RowColEventArgs)<\/p>\n<p>Dim<\/p>\n<p>Row As DataRow = Me.FindDataRow(e.Row)<\/p>\n<p>Dim ColName As String = Me.FlexGrid.Cols(e.Col).ColumnName<\/p>\n<p>Try<\/p>\n<p>If IsNothing(Me.FlexGrid(e.Row, e.Col)) Then<\/p>\n<blockquote>\n<p>Row(<\/p>\n<\/blockquote>\n<p>ColName) = System.Convert.DBNullElse<\/p>\n<blockquote>\n<p>Row(<\/p>\n<\/blockquote>\n<p>ColName) = Me.FlexGrid(e.Row, e.Col)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>msdn \u00a0\u00a0\u00a0 Hi, I have a problem with bindingsource component in framework 2.0. I have a combobox bound to a bindingsource which is also bound to a dataset with 2 related tables and a datagridview bound to the same bindingsource. What I want to do is : When the selectedindex property of my combobox changes, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6248","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6248"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6248\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}