I am new to WPF Programming.
I have a datagrid with 2 columns. 1st column is a dataGridTextColumn and 2nd column is DataGridComboboxColumn.
I have 2 values coming from database. One value i want to show in datagrid 1st column and 2nd value i want to use it as selected item/value of comboboxcolumn.
the values to be added to combobox are static, that is 0 to 9.
XAML
<DataGrid x:Name="dg_phase_details" RowHeaderWidth="0" SelectionMode="Single" CellStyle="{StaticResource Body_Content_DataGrid_Centering}" AutoGenerateColumns="False" CanUserAddRows="False" HorizontalAlignment="Left" Margin="380,154,0,0" VerticalAlignment="Top" Height="320" Width="330" AlternationCount="2" AlternatingRowBackground="LightGray" RowHeight="30" CanUserSortColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserReorderColumns="False">
<DataGrid.Columns>
<DataGridTextColumn x:Name="Phase_Name" IsReadOnly="True" Header="Phases" Binding="{Binding Phase}" Width="*" ElementStyle="{StaticResource dg_Margin_left}"/>
<DataGridComboBoxColumn x:Name="Combo_Imp_Value" Header="Importance" Width="*" />
</DataGrid.Columns>
</DataGrid>
c#
ObservableCollection<string> list_PhaseVal = new ObservableCollection<string>() { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
Combo_Imp_Value.ItemsSource = list_PhaseVal;
It shows a combobox on 2nd column of grid but without values.
How can i do it?