By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,717 Members | 1,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,717 IT Pros & Developers. It's quick & easy.

ComboBox Databinding and Scroll issue

P: 4
Hello,

I have a form with MyLabel and MyComboBox on it. In design time I set DataSource for MyComboBox to MyDataSet1, DisplayMember to TF_BADGES.Officer_Name and ValueMember to TF_BADGES.Officer_ID. TF_BADGES is the only table in my dataset with two columns (Officer_ID, Officer_Name). Here is code from my application:
Expand|Select|Wrap|Line Numbers
  1.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2.  
  3.         Me.MyLabel.DataBindings.Add("Text", Me.MyComboBox, "Text")
  4.         Me.MyTableAdapter1.Fill(Me.MyDataSet1.TF_BADGES)
  5.     End Sub
Here is my PROBLEM: if DropDownStyle for MyComboBox is set to DropDownList databinding with text property of the label doesn't work properly - if you scroll or use up and down keys label does not receive text from the combobox (you can still use dropdown button on the combobox and everything works fine). If I change DropDownStyle to DropDown - everything works just like I want it to except I want to use MyComboBox as a DropDownList.

Using: VB.NET 2005, Framework 2.0
Thank you very much for all your time!
Aug 23 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.