llblgen v2.6,adapter,vb.net,vs2008,winforms
I have a BindingSource(bound to a Entity).
The BindingSource is bound to a Combobox(CostCode) and a Text box(Field Qbdescription )
When someselects a value in the combobox..i populate the value iin the text box.
Public Class Form2
Dim TransactionToSave = New TblTransactionsEntity
Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
TblTransactionsEntityBindingSource.DataSource = TransactionToSave
End Sub
Private Sub CostCodeComboBoxEdit_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CostCodeComboBoxEdit.SelectedIndexChanged
Select Case CostCodeComboBoxEdit.EditValue
Case "4"
TransactionToSave.Qbdescription = "Here am i44444" 'A
Case "5"
TransactionToSave.Qbdescription = "Here am i555" 'B
Case "6"
TransactionToSave.Qbdescription = "Here am i666" 'C
End Select
End Sub
End Class
The above code works fine except the value selected in the combobox resets to nothing when is executes code at A, B or C
Weird..basicially when TransactionToSave.Qbdescription=<value> the event CostCodeComboBoxEdit.SelectedIndexChanged is triggered again!