itemsource

binding combox in wpf datagrid

别等时光非礼了梦想. 提交于 2019-11-28 11:39:43
问题 I have a list that I populate in the init of my viewmodel: ListOfEmployees = new List<EmployeeBO>(employeeRepository.GetEmployees(true, true)); I am trying to get a combobox in a datagrid to populate from this list. <DataGridTemplateColumn Header="U/M" MinWidth="145"> <DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <ComboBox Name="cboUnitMeasure" ItemsSource="{Binding Path=ListOfUnitMeasures}" DisplayMemberPath="UnitMeasureDescription" SelectedValuePath="UnitMeasureValue"