473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

still problem editing items in combobox

Hi,
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
Next
End If
Nov 20 '05 #1
0 2351

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Wayne Wengert | last post by:
I am trying to populate a combobox with a lisy of items. I want the 1st item to be "Make a Selection" and the following items will be names from a table in my DB (See code below). When I run the...
3
by: Varun | last post by:
Hello I am trying to make the items in my combobox be removed if they are present in my array I cant however get my code to work. The values are read into my combobox using a datareader. I then...
5
by: Wally | last post by:
I need to browse all ITEMS of a ListBox and all ITEMS of a ComboBox. I wrote 2 distinct Sub that are almost identical. The difference is only the object type. How could I browsing ITEMS using only...
9
by: Don | last post by:
Is there any way to detect when an item has been added to the Items collection of a combobox or listbox? I am inheriting a Combobox and want to validate items before they are added to the...
1
by: Gian Paolo | last post by:
hi all i'm looking for a way to add 2 items in a combobox in the same line and hide one. i'm working on the code above but it returns me only the last value i entered and i do not know why.... ...
3
by: samoore33 | last post by:
I am populating a ComboBox at run time. I insert the first value of "Choose Value" cboTaxValue.Item.Insert(0, "Choose Value") Then I loop through the rest of the values to be added to the...
0
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number...
5
by: Kevinp | last post by:
I've spent the last four hours Google searching for a way to disable items in a Combobox. I found one example in C++ which I can't get to work and another in C# that I couldn't get to work either....
2
by: crownrajesh | last post by:
First of all thanks for all who reply this Question.i have a datagridview with first column as combobox and rest as textbox column. i would like to fill the datagridview manually using c# code for...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.