Can you give me an example of how I would create and bind a DataGridComboColumn at runtime? I am unsure of how to set the binding and also what field it maps to in the itemssource of the grid? In Windows forms, I would have a DisplayMember, ValueMember,
and then the field it is mapped to in the grid. How does that work?
I am doing something like this but it doesnt work.
DataGridComboBoxColumn column = new DataGridComboBoxColumn();
column.SelectedItemBinding = new Binding("SampleID");
column.DisplayMemberPath = "SampleNumber";
column.SelectedValueBinding = new Binding("SampleID");
column.Header = (string)col.HeaderText;
IEnumerable<GeoStratSysDS.SampleRow> MySamples = from s in DataAccess.dtSample
column.ItemsSource = MySamples;