ComboBox Binding Problem - Does Not Leave Focus

Submitted by: 
Visitors have accessed this post 6559 times.

After browsing several forum sites I found so many programmers having problem with ComboBox after they bind it to a DataSet. The problem actually is not cause by a bug or the like. The error is caused by design. Here’s the following question on the internet that I found that will explain this error further: Both programmers encounter this problem and unable to move the focus from the said ComboBox. Here’s an example of the data bound ComboBox. ComboBox Data Bound Items As you can see the properties are set correctly. But if you move the Status field from a DataSet to your windows form the ComboBox is bound by default using a Text property as shown below. ComboBox Text Properties In this case all you have to do is set the Text property to “(none)”. See screenshot below for the correct settings. ComboBox Text Properties 2


This is solve my problems. I would like to send you a beer :) Regards

Thanks a lot for sharing this important point. I was stuck in the same scenario and was not able to think any reason for it. After reading this post i checked the Text property and it was already none.

But i was till facing the issue.After Looking again at the property grid i noticed that i had values set for SelectedItem property in the grid. I cleared it to 'None' and it solved the problem.

Therefore i would say, if setting Text property to none doesn't help, set all properties here to none, and it will solve this issue.


Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.