Click to See Complete Forum and Search --> : datagridview combobox binding


mps2
July 17th, 2008, 07:23 AM
Hi,
I have a datagridview that is databound to a BindingSource containing objects of type MyCustomClass.

MyCustomClass contains two Properties (Name, Class) and 1 dictionary, myUserDictionary<string,string>

class MyCustomClass{

string Name {get;set;}
string Class {get;set;}
Dictionary<string,string> myUserDictionary;

}

Is there a way to set a DataGridViewComboBoxColumn's DataPropertyName attribute to a specific <key,value> pair of myUserDictionary?

This one has me stumped...

cjard
July 17th, 2008, 07:08 PM
the time it will take you to figure out , you'll wish you'd simply used a strongly typed datatable. it has all the features you seek if you make one column the primary key