DataTable internal index is corrupted

前端 未结 18 1475
轻奢々
轻奢々 2020-12-04 15:55

I am working with a .NET WinForms app in C#, running against the 3.5 .NET framework. In this app, I am setting the .Expression member of a DataColumn in a

18条回答
  •  青春惊慌失措
    2020-12-04 16:16

    Had the same with .NET 4.5.2 win forms app. In my case the reason appeared to be multiple controls bound to single BindingSource column. I am aware that binding many controls to one value is asking for trouble but I it has been the lesser evil for me due to pretty complex layout.

    It appeared that changing the value from one side raised multiple OnChange events trying to perform the same operation against the BindingSource which resulted with the error in question.

    I have tried suspending binding but with no success. I have implemented flags preventing the code from being executed many times on parallel and things are better.

提交回复
热议问题