Hi All,
I have a form with lots of related databound info on it. If a user loads up the form it starts creating a new 'booking' and adds new 'booking dates'. If they then decide to close the form without doing anything I need to delete all the info created.
My form is bound to lists of buisness entities and I need to delete them all and remove them from the lists. Problem is I get:
"DataBinding could not find a row in the list that is suitable for all bindings"
I assume I have left something behind but I dont know what or how to find out.
Any ideas
Danny

"DataBinding could not find a row in the list that is suitable for all bindings"
jobrig
I am using VS 2003.
Disconnected David
Mark with unique display name
This error is generated when the CurrencyManager is unable to successfully bind to any rows in a list (due to exceptions being thrown during the binding process). Since you are removing all items from the list, there are "no suitable" rows for binding and you're seeing this exception. A better way to handle this may be to SuspendBinding() on your list prior to removing all items and then ResumeBinding() after you're reset (cleared) the list.
Are you using VS 2005 If so, and your list is bound through a BindingSource, then you can set the BindingSource.DataSource to null prior to clearing the list.
Joe Stegman
The Windows Forms Team
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.
ActiveDev
Please generate a repro of the issue and log a bug here: http://lab.msdn.microsoft.com/ProductFeedback/Default.aspx. I have seen this issue reported by several customers but have been unable to isolate the problem.
Thanks,
Joe Stegman
The Windows Forms Team
Microsoft Corp.
This posting is provided "AS IS" with no warranties, and confers no rights.
Csabi
No. The project this occured in is currently on hold. It might be resolved somewhere in the next few months, but also I wonder if this still happens in .NET 2.0, cause changes are this project will be converted.
Still I'm interested to see why this happens and how it can be resolved.
JohnYe
This also happens when I call SuspendBinding and then ResumeBinding (exception occurs on the resume, ofcourse).
Also, without this, the record isn't visable in the bound controls (not the right values, that were initialized when creating the record).
Any suggestions I would be very greatfull.
pledreau
Joe -if you're still out there
On my ADO.Net Form I have Tabs full of Textboxes/ComboBoxes bound to a DataSet table (i.e. DS - table.field(s)) . The Textboxes/ComboBoxes show the data associated with a selected row in the adjacent DataGrid on the form. Whenever I change from a Debug to a Release complile mode in VS and, vice versa, I get the following error:
Exception: DataBinding could not find a row in the list that is suitable for all bindings.
The program doesn't crash when I run it but, I do notice that some of the data in the Textboxes/Comboxes are corrupt (don't match DG fields) with either missing data or incorrect data from either somewhere else in the table or from the ComboBox drop down. What stange is it seems to only occur on the Tabs with the exception of the base or orginal Tab (First Tab). Where should I begin to look Do I null out all the text fields first Bind Tabs somehow
Steve
Lelle
Jonathan,
I'm having this exact same issue, where you able to resolve it And if so, how
Thanks!