title: Editable DataGrid in WPF
body: <p>I have a program where I need the user to input data in a DataGrid.  I though the simple act of setting the 'CanUserAddRows' would be enough to let the user add new rows, but it seem that it won't cut it.</p>
  
  <p>Is there something else I need to define to make them work? My DataGrid has ComboBoxes and TextBoxes in them so it's pretty common controls.</p>
  
  <p>The code I have so far is this</p>
  
  <pre><code>&lt;dg:DataGrid Name="GridFournisseur" ItemsSource="{Binding}" 
       Margin="423,41,23.5,0" Height="193" VerticalAlignment="Top" 
       CanUserAddRows="True" CanUserDeleteRows="True" IsTabStop="True" RowHeight="12"                         SelectionUnit="CellOrRowHeader"&gt;
  
      &lt;dg:DataGrid.Columns&gt;
  
          &lt;dg:DataGridComboBoxColumn Header="Fournisseur" Width="*" MinWidth="150"                                                
                                         IsReadOnly="False" /&gt;
  
          &lt;dg:DataGridTextColumn Header="Prix" Width="SizeToHeader" MinWidth="50"
                                         Binding="{Binding Categorie}" 
                                         IsReadOnly="False"/&gt;
          &lt;dg:DataGridTextColumn Header="Délai" Width="SizeToHeader" MinWidth="50"
                                         Binding="{Binding NoPiece}" 
                                         IsReadOnly="False"/&gt;
      &lt;/dg:DataGrid.Columns&gt;
  &lt;/dg:DataGrid&gt;
  </code></pre>
  
  <p>I just have this DataGrid in which I would like to edit its content and at the beginning it's empty.</p>