I am trying to create a DataGriodViewComboBoxColumn where the items in each row are filtered by another value in the row.
I see lots of posts that say bind the dropdown data to the column and then add a filter when the EdiotingControlShowing event occurs and remove it on the CellEndEdit event.
But this doesn't cover the initial paint of the display where the data comes from a bound data source.
I have tried setting individual item sets on each row when the OnRowAdded event goes off but now I am getting strange behaviour. The dropdown items are set correctly but the FormattedValue for the ComboBoxCell is taken from ValueMember not DisplayMember.
I.e. ValueMember is a set of id numbers and DisplayMember is the corresponding set of names.
When I open the dropdown I see the DisplayMember items but when I select one it is the corresponding ValueMember value that gets shown.
Does anyone have an idea why this is so. Or a good way to create a conditional dropdown per row?