Microsoft KB Archive/839616

From BetaArchive Wiki
Knowledge Base


FIX: The value of the SelectedIndex property of the ComboBox control does not change when you set the text by using the Text property

Article ID: 839616

Article Last Modified on 5/21/2007



APPLIES TO

  • Microsoft .NET Framework 1.1




SYMPTOMS

The value of the SelectedIndex property of the ComboBox control does not change if you set the text by using the Text property in the Microsoft .NET Framework 1.1. Additionally, the text of the ComboBox control appears as an empty string when you access the Text property of the ComboBox control.

CAUSE

If you try to put a value that does not exist in the ComboBox control by using the Text property, the ComboBox control reverts to the last value that was selected from the list.

RESOLUTION

To resolve this problem, obtain the latest service pack for the Microsoft .NET Framework 1.1. The following file is available for download from the Microsoft Download Center:
The Microsoft .NET Framework 1.1 Service Pack 1

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in the Microsoft .NET Framework 1.1 Service Pack 1.

MORE INFORMATION

In the .NET Framework 1.0, you can extract the value that you put in the Text property after you update the data in the ComboBox control. You cannot do this in the .NET Framework 1.1. However, the value in the ComboBox control display area in the .NET Framework 1.1 shows the correct information.

REFERENCES

For additional information about standard terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


For additional information about why the ComboBox does not clear, click the following article number to view the article in the Microsoft Knowledge Base:

327244 BUG: ComboBox does not clear when you set SelectedIndex to -1


For additional information about setting the value in code, click the following article number to view the article in the Microsoft Knowledge Base:

327555 BUG: The Text property of a data-bound ComboBox returns an incorrect value when you set the value in code


For additional information, visit the following Microsoft Developer Network (MSDN) Web sites:

ComboBox.Text property
http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.text(vs.71).aspx

ComboBox.SelectedIndex property
http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindex(vs.71).aspx


Keywords: kbqfe kbhotfixserver kbnetframe110sp1fix kbcombobox kbbug kbfix kbnetframe110presp1fix KB839616