Click here to Skip to main content
15,913,610 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: VB application generated e-mails Pin
KaptinKrunch14-Feb-06 5:44
KaptinKrunch14-Feb-06 5:44 
GeneralRe: VB application generated e-mails Pin
Sandie14-Feb-06 6:04
Sandie14-Feb-06 6:04 
GeneralRe: VB application generated e-mails Pin
KaptinKrunch14-Feb-06 6:21
KaptinKrunch14-Feb-06 6:21 
AnswerRe: VB application generated e-mails Pin
Dave Kreskowiak14-Feb-06 9:04
mveDave Kreskowiak14-Feb-06 9:04 
AnswerRe: VB application generated e-mails Pin
Kevin McFarlane14-Feb-06 10:08
Kevin McFarlane14-Feb-06 10:08 
Questioncache is not working Pin
Narayana M14-Feb-06 3:15
Narayana M14-Feb-06 3:15 
AnswerRe: cache is not working Pin
Dave Kreskowiak14-Feb-06 8:58
mveDave Kreskowiak14-Feb-06 8:58 
QuestionVB .NET ComboBox: empty field needed Pin
Mashinovodja14-Feb-06 2:59
Mashinovodja14-Feb-06 2:59 
Is there a way to make teh ComboBox field appear empty?

I have a Windows form with a ComboBox in the first row and a DataGrid and some other controls in sync with the DataGrid. The first user action is to choose an item in the ComboBox. Then I use the SelectedValueChanged event to fill the form controls with data related to the item the user choose.
It works the way I wanted it, but there is one thing that bothers me and I so far I was unable to find a solution:
When the user first opens the form, the first item in the Combo is already choosen by default and ComboBox field is filled with text. I would like that field to appear empty until the user explicitely chooses an item.
In VB6 it was easy: on Form_Load, I set the ListIndex property to -1 for an ordinary ComboBox, or the BoundText property to '', for a Data Combo.
But, in VB. NET, setting the SelectedIndex property to -1 or any other non existing value is ignored and the ComboBox defaults to the first item (SelectedIndex = 0). (Bug or feature?)
It is confusing, because when the form is first open, the Combo field is filled, but all the other controls are empty. If the user wants to see data related to the first Combo item, she has to click the Combo and chose the item that appears already choosen which seems rather illogical.

Thank you in advance for any hints.
Best regards.
AnswerRe: VB .NET ComboBox: empty field needed Pin
Joshua Quick14-Feb-06 6:50
Joshua Quick14-Feb-06 6:50 
GeneralRe: VB .NET ComboBox: empty field needed Pin
Mashinovodja17-Feb-06 1:03
Mashinovodja17-Feb-06 1:03 
GeneralRe: VB .NET ComboBox: empty field needed Pin
Joshua Quick17-Feb-06 7:05
Joshua Quick17-Feb-06 7:05 
Questionmanifest file?????? Pin
Hari Om Prakash Sharma14-Feb-06 2:01
Hari Om Prakash Sharma14-Feb-06 2:01 
AnswerRe: manifest file?????? Pin
Marc Soleda14-Feb-06 2:41
Marc Soleda14-Feb-06 2:41 
GeneralRe: manifest file?????? Pin
Hari Om Prakash Sharma14-Feb-06 2:49
Hari Om Prakash Sharma14-Feb-06 2:49 
AnswerRe: manifest file?????? Pin
Guffa14-Feb-06 2:55
Guffa14-Feb-06 2:55 
Questiondatagridview problem Pin
thepityone13-Feb-06 20:44
thepityone13-Feb-06 20:44 
Questionhow can i add unbound data to datagridview Pin
thepityone13-Feb-06 20:25
thepityone13-Feb-06 20:25 
AnswerRe: how can i add unbound data to datagridview Pin
Dave Kreskowiak14-Feb-06 8:50
mveDave Kreskowiak14-Feb-06 8:50 
Questionon mouse event Pin
aqui_i13-Feb-06 20:07
aqui_i13-Feb-06 20:07 
AnswerRe: on mouse event Pin
Dave Kreskowiak14-Feb-06 8:48
mveDave Kreskowiak14-Feb-06 8:48 
QuestionChang Properties File Summary Pin
kbbman13-Feb-06 20:01
kbbman13-Feb-06 20:01 
AnswerRe: Chang Properties File Summary Pin
Dave Kreskowiak14-Feb-06 8:46
mveDave Kreskowiak14-Feb-06 8:46 
QuestionUpdate Data To Database Using Table Adapter Pin
shiroamachi13-Feb-06 19:32
shiroamachi13-Feb-06 19:32 
AnswerRe: Update Data To Database Using Table Adapter Pin
Dave Kreskowiak14-Feb-06 8:40
mveDave Kreskowiak14-Feb-06 8:40 
GeneralRe: Update Data To Database Using Table Adapter Pin
shiroamachi14-Feb-06 16:38
shiroamachi14-Feb-06 16:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.