ComboBox Text not Changing


G

Guest

If I try to change the text displayed in the ComboBox(in 'DropDown' Style)
from with in it's TextChanged event by setting the Text Property of the
Combo, the changed text is not appearing in the Combo, but this happens only
when the text is changed by selecting item by dropping it down, when the text
is changed by editing the EditControl of the Combo it is working fine. Can
anyone help me?
 
Ad

Advertisements

Ad

Advertisements

G

Guest

Private Sub cboNationality_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cboNationality.TextChanged

If FieldChangeStatus = EnumFieldChangeStatus.UserNotStarted Then
If OperationMode = EnumOperationMode.GetRecords Then
'While Initiating New Record, it does not clear the rows if any
in the Judges DataTable
'which is retrieved through GetRecords
InitiateNewRecordFromFields()
ElseIf OperationMode = EnumOperationMode.NewOne Then
FieldChangeStatus = EnumFieldChangeStatus.UserStarted
ElseIf OperationMode = EnumOperationMode.Edit Then
Me.Cursor = Cursors.WaitCursor
If TryBeginUpdate() Then
CurrentRecordDataChanged()
Else
RemoveHandler cboNationality.TextChanged, AddressOf
cboNationality_TextChanged
Dim nPointer As Integer =
Me.BindingContext(dtJudgesView).Position
Dim dr As DataRow = dtJudgesView.Rows(nPointer)
If Not IsDBNull(dr("Nationality")) Then
cboNationality.Text = CType(dr("Nationality"), String)
Else
cboNationality.Text = ""
End If
AddHandler cboNationality.TextChanged, AddressOf
cboNationality_TextChanged
End If
Me.Cursor = Cursors.Default
End If
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top