Binding Navigator and Bound Textbox Act Funny

I have a Windows form application where mutliple text boxes are bound to a SQL CE 3.5 database with a binding source, binding navigator, table adapter, etc. There is also a drop down list bound to the same table using the same binding source. When the program first starts, everything is correct. When the user FIRST goes to an item, the item name displays correctly as do all the other text boxes. However, whenever the user returns to an item, either using the navigator or the drop down list, the item name textbox displays system.data.datarowview instead of the item name. All other textboxes are correct.
The data binding is: Text: ItemsBindingSource - ItemName

I've had a fruitless search for two days on this. Nothing on E-E seems to help but I may have been using the wrong search terms. Any suggestions would be greatly appreciated.
LVL 1
rkulpAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Randy DownsOWNERCommented:
Did you see this?

cbxBank.DataSource = ....;//specify your datasource
cbxBank.DataValueField = "BankID";
cbxBank.DataTextField = "BankName";
cbxBank.DataBind();

Open in new window

rkulpAuthor Commented:
Unfortunately, one cannot set a datasource for a text box  as DataSource is not a member of textbox. Also, why do all the other textboxes work fine but this one does not? I did put this one on separately from drag and drop the datasource but it is configured identically to the others. I may drag and drop the datasource again and delete all the redundant textboxes. I should be able to manually bind a textbox anyway. Also, why does it show the data properly when initially navigated to but then replace it if I go to another record and return?
rkulpAuthor Commented:
I did a drag and drop from the table in the data sources tab (VS2010) to the form using the same binding source. I got exactly the same behavior for the new textboxes as the old one. It seems to be something in the binding source or binding navigator.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

Randy DownsOWNERCommented:
All the text boxes use the same binding source? Only one has these issues?

Maybe you can configure one of the working text boxes to handle the input for the troublesome text box.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rkulpAuthor Commented:
Randy,
Thanks for sticking with me. I appreciate your suggestions on this wierd problem.


Maybe you can configure one of the working text boxes to handle the input for the troublesome text box.

I don't know how to do that. One thing I did was to add another Windows form to the project and then, dragging the detail view of the datasource onto the form, made the same set of textboxes with a new binding navigator, all bound to the same binding source. This one worked perfectly regardless of how many times I changed records.

I expect I could delete all the controls on the original tab page and rebuild it. Possibly that would work. The problem with that, even if it worked, is that I would not learn anything and still not understand what caused this problem. The test a few comments above was on the same form using the same binding navigator.
rkulpAuthor Commented:
Randy,

I gave up and deleted all the old textboxes and binding navigator and then started over. It seems to work fine now. Please let me know how you wish to close this question. I'll be glad to give you all the points.
Randy DownsOWNERCommented:
Glad you got it working.

That's actually not a bad avenue to take when things get weird. Please credit this:
Maybe you can configure one of the working text boxes to handle the input for the troublesome text box.
as the answer & note that the real solution was to start over.
rkulpAuthor Commented:
Unfortunately, the real solution turned out to be just to delete all the textboxes and start over.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.