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.Offic er_Name and ValueMember to TF_BADGES.Offic er_ID. TF_BADGES is the only table in my dataset with two columns (Officer_ID, Officer_Name). Here is code from my application:
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!
I have a form with MyLabel and MyComboBox on it. In design time I set DataSource for MyComboBox to MyDataSet1, DisplayMember to TF_BADGES.Offic er_Name and ValueMember to TF_BADGES.Offic er_ID. TF_BADGES is the only table in my dataset with two columns (Officer_ID, Officer_Name). Here is code from my application:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.MyLabel.DataBindings.Add("Text", Me.MyComboBox, "Text") Me.MyTableAdapter1.Fill(Me.MyDataSet1.TF_BADGES) End Sub
Using: VB.NET 2005, Framework 2.0
Thank you very much for all your time!