I am having virtually the same problem as this:
http://stackoverflow.com/questions/433281/c-update-combobox-bound-to-generic-list
However, I am trying to change the displayed strings; not add, remove, or sort. I have tried the BindingList solution provided in the referenced question, but it has not helped. I can see the combobox's DataSource property is correctly updated as I edit the items, but the contents displayed in the combobox are not those in the DataSource property.
my code looks as follows:
mSearchComboData = new List<SearchData>();
mSearchComboData.Add(new SearchData("", StringTable.PatientID));
mSearchComboData.Add(new SearchData("", StringTable.LastName));
mSearchComboData.Add(new SearchData("", StringTable.LastPhysician));
mSearchComboData.Add(new SearchData("", StringTable.LastExamDate));
mBindingList = new BindingList<SearchData>(mSearchComboData);
SearchComboBox.Items.Clear();
SearchComboBox.DataSource = mBindingList;
SearchComboBox.ValueMember = "Value";
SearchComboBox.DisplayMember = "Display";
...
When I try to update the content I do the following:
int idx = SearchComboBox.SelectedIndex;
mBindingList[idx].Display = value;
SearchComboBox.Refresh();
EDIT::
RefreshItems seems to be a private method. I just get the error message:
"'System.Windows.Forms.ListControl.RefreshItems()' is inaccessible due to its protection level"
ResetBindings has no effect.