title: WPF datagrid "EditItem is not allowed for this view" exception
body: <p>I programmatically add <code>DataGrid</code>:</p>
  
  <pre><code>System.Windows.Controls.DataGrid dataGrid = new System.Windows.Controls.DataGrid();
  dataGrid.GridLinesVisibility = DataGridGridLinesVisibility.None;
  dataGrid.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
  dataGrid.Background = Brushes.White;
  DataGridTextColumn textColumn = new DataGridTextColumn();
  textColumn.Width = 250;
  textColumn.Header = "Account";
  textColumn.Binding = new Binding("Account");
  dataGrid.Columns.Add(textColumn);
  </code></pre>
  
  <p>When I add Item:</p>
  
  <blockquote>
    <p>Globals_Liker.list_datagrid[tabControl1.SelectedIndex].Items.Add(Globals_Liker.list_item[tabControl1.SelectedIndex][i]);</p>
  </blockquote>
  
  <p>But if I doubleclick on Items I have error:</p>
  
  <blockquote>
    <p>"EditItem" is not allowed for this view. </p>
  </blockquote>
  
  <p>How to make that error does not pop up?</p>