I have a DataGridView with 4 columns, one of them being a drop-down (ComboBox) column. The values in this column must be distinct so once a given drop-down values is selected in a row, I'd like it to not be available in any of the drop-downs in other rows. If a given value is unselected it should show up in the drop-downs again. I found a few articles with similar examples (1,2,3); however, all of them seem to involve subscribing to an event and manually populating the ComboBox.
- Is there a way to accomplish this with databinding alone (maybe to an IEnumerable that's basically a
all.Except(selected)
Linq query)? - If databinding alone isn't enough, is there a better way to do it than the examples I found?
I'm a bit new to WinForms development so having trouble telling apart good advice from "yeah...that'll work, sort of".