title: Add empty row to WPF DataGrid and edit cells afterwards
body: <p>I'm new to WPF and trying to convert a program from WinForms to WPF. I've come across a hiccup trying to convert from DataGridView to DataGrid and adding rows. Any help is appreciated.</p>
  
  <p>Original code:</p>
  
  <pre><code>for (int i = 0; i &lt; noteArray.Count; i++)
          {
              int newIndex = dtgrdNotes.Rows.Add();
              dtgrdNotes.Rows[newIndex].Cells[0].Value = noteArray[i].ToString();
              dtgrdNotes.Rows[newIndex].Cells[1].Value = chkbx1.Checked;
              dtgrdNotes.Rows[newIndex].Cells[2].Value = chkbx2.Checked;
          }
  </code></pre>
  
  <p>I need that code to work in WPF and I've tried different variations of <strong>dtgrdNotes.Items</strong> and even a <strong>DataRowView</strong> but nothing has worked so far. any suggestions?</p>
  
  <p>Update* XAML that goes with the controls issue for Richard:</p>
  
  <pre><code>&lt;DataGrid Name="dtgrdNotes" Height="178" Width="739" HorizontalAlignment="Right" VerticalAlignment="Bottom" Canvas.Left="1" IsEnabled="False" &gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTextColumn x:Name="dgtxtbxNote" Width="*" Binding="{Binding note}"/&gt;
          &lt;DataGridCheckBoxColumn x:Name="dgchbxInquire" Width="100" Binding="{Binding inquire}" /&gt;
          &lt;DataGridCheckBoxColumn x:Name="dgchbxPrint" Width="100" Binding="{Binding print}" /&gt;
          &lt;DataGridTemplateColumn x:Name="dgbtncDelete" Width="80" Header="Button"&gt;
              &lt;DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Button x:Name="dgbtncDeleteButton" Content="Delete" Width="50px" Height="10px" FontWeight="Bold" /&gt;
                  &lt;/DataTemplate&gt;
              &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;/DataGridTemplateColumn&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>