Click to See Complete Forum and Search --> : [RESOLVED] Datasource = List<object> + DataPropertyName


Grofit
June 16th, 2009, 07:50 AM
Hey,

Ive got a bit of a problem related to one of my previous posts... i have got a datagridview that has one of its columns set as a combo box and has an enum turned into a list of objects (with a key/value property exposed) which populates the list fine and is great...

However when i try to link up a datatable to the view i keep getting DataErrors spitting up, now i think its down to the fact that its trying to pair up the byte value in the table to the byte value in the combo box, but must not be able to match it up... so i was just wondering if anyone else had ever had this sort of problem?

Grofit
June 16th, 2009, 09:08 AM
Found the problem and fixed it, it was down to the property not matching the type... i thought they were both bytes, and although internally they were, one of them was being forced into an int at some point. So when matching the other side up to an int it worked fine...