title: ''EditItem' is not allowed for this view.' when trying to edit a item in the DataGrid
body: <p>So when I doubleclick an item to edit the value in my datagrid I keep getting the error message.</p>
  
  <blockquote>
    <p>''EditItem' is not allowed for this view.'</p>
  </blockquote>
  
  <p>And it looks like this
  <a href="https://i.stack.imgur.com/nzVw9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nzVw9.png" alt="enter image description here"></a></p>
  
  <p>I've never encountered that before so I am not sure what way to go to deal with this.
  What is causing this issue and what is the correct way of dealing with such an issue so I know how to deal with it in the future.
  I tried looking into it on Google but it all had with lists to do and since I am not using a list I couldnt see the connection to my application.</p>
  
  <p>XAML
      </p>
  
  <pre><code>    &lt;DataGrid Name="dgItems"&gt;
          &lt;DataGrid.Columns&gt;
              &lt;DataGridTextColumn Header="Property" Binding="{Binding Property}" /&gt;
              &lt;DataGridTextColumn Header="Value" Binding="{Binding Value}" /&gt;
          &lt;/DataGrid.Columns&gt;
      &lt;/DataGrid&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>CS</p>
  
  <pre><code>private void btnStart_Click(object sender, RoutedEventArgs e)
  {
      string path = "";
      OpenFileDialog ofd = new OpenFileDialog();
      ofd.Filter = "Properties | *.properties";
      if (ofd.ShowDialog() == true)
      {
          path = ofd.FileName;
      }
      using (StreamReader sr = new StreamReader(path))
      {
          string line;
          while ((line = sr.ReadLine()) != null)
          {
              if (!line.StartsWith("#"))
              {
                  string[] lines = line.Split('=');
                  string property = lines[0];
                  string value = lines[1];
                  this.dgItems.Items.Add(new ServerProperties { Property = property, Value = value });
                  Debug.Print($"Property: {property} Value: {value}");
              }
          }
      }
  }
  </code></pre>
  
  <p>My Class that gets &amp; sets the values</p>
  
  <pre><code>public class ServerProperties
  {
      public string Property { get; set; }
      public string Value { get; set; }
  }
  </code></pre>