Re: Combobox with empty or null values

From: Volker Jobst (buddde_at_gmx.de)
Date: 06/02/04


Date: Wed, 2 Jun 2004 11:21:44 +0200

Thanks for your help, now it works fine.

I knew this bug before but I did not think that it would be the reason for
my problem too.

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:ud$ax28REHA.3452@TK2MSFTNGP10.phx.gbl...
> * "Volker Jobst" <buddde@gmx.de> scripsit:
> > I'm using the Windows Forms Combobox to display my employees stored in
the
> > SQL Server. I use the DisplayMember / ValueMember thing and it works
fine.
> >
> > But there is a problem when I try to let the combobox emtpy e.g. no
employee
> > should be selected. The database contains no employee with the ID 0, but
> > using this code the combobox shows the first entry and the selectedindex
is
> > 0. So I tried to set the selectedindex to -1, but even this does not
work
> > well.
>
> BUG: ComboBox Does Not Clear When You Set SelectedIndex to -1
> <URL:http://support.microsoft.com/?id=327244>
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>



Relevant Pages

  • Re: What do you dislike about OSX?
    ... But no, that's not the reason. ... I have two screens ... was about - so when I open a new windows it is the same size and there is no ... Most end users don't even know the bug exists. ...
    (comp.sys.mac.advocacy)
  • GetPrinterW Not working on Windows 98
    ... This is working fine except for windows 98 ... But GetPrinterA is working with 98. ... I don't know the reason. ... any bug ...
    (microsoft.public.win32.programmer.gdi)
  • re:combobox fill causing SelectedIndexChanged without selecting
    ... I don't think it's the same bug. ... In my case it fires for no reason. ... Still looking for a solution because I really want to use a combobox ...
    (microsoft.public.dotnet.languages.vb)
  • ComboBox.Items.Clear() causes the selection of Text inside the edit of the ComboBox
    ... when I call Items.Clearfor a ComboBox the text ... inside the edit of the ComboBox is selected with absolutely no reason. ... Is there a way to avoid this (bug)? ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Novice w/ SQL/J# trouble
    ... the windows form designer. ... (DisasterType and DwellingType); the datasets were built using the ... Adapter4 belongs to DwellingType). ... There is another combobox (Utilities) ...
    (microsoft.public.dotnet.vjsharp)