Hi, I have a DataGridViewComboBoxCell, whose DataSource is a List. When an item is selected from the list, I wish to store the index of the item, not the item itself, in order that I can switch DataSources and still display a relating list entry.
e.g. I have a list of months (January-December). I want to select "April" and store "3" in the cell (but still display "April" as the selected value). I then decide to display all the month values in Polish, change the DataSource, and the value of "4" now displays "kwiecień".
I've looked into DisplayMembers and ValueMembers and things like the GetFormattedValue and GetEditedFormattedValue functions, but I can't make head nor tail of it. Most of it seems to be designed for use with database data, and that's not what I'm using here.
Can someone with insight tell me the best calls to override in order to get the sort of behaviour I'm looking for?