Article ID: 839616 - Last Review: May 21, 2007 - Revision: 2.3 FIX: The value of the SelectedIndex property of the ComboBox control does not change when you set the text by using the Text propertySYMPTOMSThe 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. CAUSEIf 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. RESOLUTIONTo 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 http://www.microsoft.com/downloads/details.aspx?FamilyId=A8F5654F-088E-40B2-BBDB-A83353618B38
(http://www.microsoft.com/downloads/details.aspx?FamilyId=A8F5654F-088E-40B2-BBDB-A83353618B38)
STATUSMicrosoft 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 INFORMATIONIn 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
(http://support.microsoft.com/kb/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
(http://support.microsoft.com/kb/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
(http://support.microsoft.com/kb/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 (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 (http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.selectedindex(vs.71).aspx)
| Article Translations
|
Back to the top
