I have a basic form with a combobox, a textbox, and a button on it. The combobox has an unalterable number of items within it, but the items themselves can be changed by inputting a new value for the selected item.

From the example in the picture, if I input a string such as “identifier”, the selected item in the combobox changes from “ID” to “identifier”, as expected. However, if I input “id”, the logic (below) executes normally, the item updates, but visually, the item does not change from “ID” to “id”.
Here is the code for the event handler of the button
private void btnApply_Click(object sender, EventArgs e) {
string newValue = txtNewName.Text;
if(string.IsNullOrWhiteSpace(newValue)) {
MessageBox.Show("Please input a new column name");
return;
}
if(cmbHeaderNames.Items.Contains(newValue)) {
MessageBox.Show("A column with that name already exists");
return;
}
cmbHeaderNames.Items[cmbHeaderNames.SelectedIndex] = newValue;
txtNewName.Text = "";
}
I believe that the ComboBox is doing some string comparison, because the following code sample works.
Apparently, the update successfully applies if the two string values are not identical when applying ToUpper() or ToLower().