Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confusing combo box problems

Status
Not open for further replies.

01310564

Programmer
Oct 9, 2003
96
0
0
GB
I have a really confusing issue with combo boxes.

I have a combo box which is populated from a dataset and when you select an item it populates lots of textboxes with the relevant data from the database. Simple!

On my machine, with VS Studio 2002 installed, when you first load the form with the combo box on it, the first item in the list is selected and all the relevant textboxes are populated. So far so good!

The problem occurs on the deployment machines of which there are several some with .net Framework 1.1 and others with 2.0.

When the form with the combo box on it loads, the first item in the list is selected but none of the textboxes have been populated. The user has to click on the first item again in order to populate the textboxes. WHY IS IT DIFFRENT ON MY COMPUTER?

Has anyone else had this problem or know how to fix it?

Thanks,

Hugh

 
Is your code for populating the combobox in the click event?
 
No it's using the SelectedIndexChanged event. Please ask if any other information would help.

Cheers,

Hugh
 
I had problems with combboxes raising the SelectedIndexChanged event when I first loaded the file so I added set the combo box to select the first item during the forms load event, this has always worked for me since, give it a go and tell me what you think.
 
My combo boxes intially load on form load. That way its always loaded when the form loads. You could place the same code in the selected index as a way to reload.
 
Interestingly enough I discovered if the PC has .net framework 1.0 installed as well as 1.1 then it works fine!

Thanks for your responses.

Cheers,

Hugh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top