Datacombo issue

A

Antonio Paglia

Hi people,

Dim rows as string = "item1;item2;item3....."
Combo.DropDownStyle = ComboBoxStyle.DropDownList
Combo.DataSource = rows.Split(";"c)
Combo.SelectedIndex = -1

The combo is placed inside an MDI Child form. When the form is showed, the
combobox allways apears with the first item selected.
What is wrong ???

Please, help me !!

TIA
 
Joined
May 27, 2006
Messages
3
Reaction score
0
Hi Antony

well ... i think it is not possible to have a 'DropDownList' style and no selected item (e.g. 'Combo.SelectedIndex=-1'). That's way the first available item is choosed automatically by the environment.

I suggest to put a 'neutral' item ('Please choose an item') at the top of the list and select it when the form is loaded. Then upon completion of whatever the action is validate the user's choice and alarm if no other selection is made ...
 

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

Similar Threads


Top