title: how to make particular column of datagrid a combobox when AutoGenerateColumns="True"
body: <p>I am new to MVVM . I am using wpf with MVVM in my project . So I am testing things right now before diving into an app I need to write.</p>
  
  <p>My page (EmpDetailsWindow.xaml) is like this </p>
  
  <pre><code>&lt;Grid&gt;
      &lt;DataGrid Name="dgEmployee" Grid.Row="0" AutoGenerateColumns="True" ItemsSource="{Binding EmployeeDataTable}" CanUserAddRows="True" CanUserDeleteRows="True" IsReadOnly="False"  /&gt;
      &lt;Button x:Name="btnSubmit" Content="Submit" Command="{Binding SubmitCommand}" CommandParameter="sample param" HorizontalAlignment="Left" Margin="212,215,0,0" VerticalAlignment="Top" Width="75"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>and my model (EmpDetailsWindowViewModel) is as below</p>
  
  <pre><code>public class EmpDetailsWindowViewModel : INotifyPropertyChanged
      {
          public ICommand SubmitCommand { get; set; }
          public EmpDetailsWindowViewModel()
          {
              EmployeeDataTable = DataTableCreator.EmployeeDataTable();
              GenderDataTable = DataTableCreator.GenderDataTable();
              SubmitCommand = new SubmitCommand();
          }
  
          DataTable _employeeDataTable;
          public DataTable EmployeeDataTable
          {
              get { return _employeeDataTable;}
              set
              {
                  _employeeDataTable = value;
                  RaisePropertyChanged("EmployeeDataTable");
              }
          }
  
          DataTable _genderDataTable;
          public DataTable GenderDataTable
          {
              get { return _genderDataTable; }
              set
              {
                  _genderDataTable = value;
                  RaisePropertyChanged("GenderDataTable");
              }
          }
  
          public event PropertyChangedEventHandler PropertyChanged;
  
  
          public void RaisePropertyChanged(string propertyName)
          {
              if (PropertyChanged != null)
              {
                  PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
              }
          }
      }
  </code></pre>
  
  <p>datagrid is successfully bound to the datatable . Now I have a column "Gender" in datagrid. This should be a combobox and the item source of the cobobox is got from GenderDataTable of the view model . How can I achieve this ?</p>