So, every few months I write something in WinForms to remind myself why I hate it.
Today is the day.
I'm trying to bind a List<T> to a DataGridView control, and I'm not having any luck creating custom bindings (Ugh at all the late bound crap).
I tried:
gvProgramCode.DataBindings.Add(new Binding("Opcode",code,"Opcode"));
It throws an exception, saying that nothing was found by that propertyname.
The name of the column in question is "Opcode". The name of the property in the List<T> is Opcode.
I'm getting angry at winforms again.
EDIT: the problem was that I did not have the bindable fields in my object as properties, just public fields...Apparently it doesn't reflect on fields, just properties.