469,903 Members | 1,993 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

still problem editing items in combobox

I already post this item but now I know whats wrong: I want to allow the
user to edit the items in a combobox. The problem is that the textchange
event works just one time (for the first changed letter) because he reset
the selectedindex of the combobox to -1. In debug mode I can't see where he
does this. How can I solve this?
My code sofar:
contactlijst is a structure and the volgnummer is the index of the item in
the combobox

If combobox.SelectedIndex > -1 Then
Dim i As Integer
For i = 0 To contactlijst.Length - 1
If (combobox.Text <> "") And (contactlijst(i).volgnummer =
ddlnaam.SelectedIndex) Then
If combobox.Text <> contactlijst(i).contactnaam Then
contactlijst(i).gewijzigd = True
contactlijst(i).contactnaam = combobox.Text

combobox.Items.Insert(contactlijst(i).volgnummer,c ontactlijst(i).contactnaam
combobox.Items.RemoveAt(contactlijst(i).volgnummer + 1)
combobox.SelectedIndex = contactlijst(i).volgnummer
combobox.Text =
combobox.Items.Item(contactlijst(i).volgnummer).To String
Exit Sub
End If
End If
End If
Nov 20 '05 #1
0 2206

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Wayne Wengert | last post: by
3 posts views Thread by Varun | last post: by
5 posts views Thread by Wally | last post: by
1 post views Thread by Gian Paolo | last post: by
3 posts views Thread by samoore33 | last post: by
reply views Thread by Frnak McKenney | last post: by
5 posts views Thread by Kevinp | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.