title: TwoWay Binding ObservableCollection to DataGrid in WPF not working
body: <p>I have this simple DataGrid in my application. Somewhere in the source I bind the <code>ItemsSource</code> property of it to an <code>ObservableCollection&lt;System.Windows.Points&gt;</code>. So the points are shown in the <code>DataGrid</code>. The problem is however I have set the <code>TwoWay</code> binding but when changing the point coordinate values in the <code>DataGrid</code>, actual point values int the <code>ObservableCollection</code> are not changed!</p>
  
  <p>What is going wrong?</p>
  
  <pre><code>&lt;DataGrid Name="pointList" AutoGenerateColumns="False"&gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTemplateColumn Header="X" Width="200"&gt;
              &lt;DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;TextBox Text="{Binding Path=X, Mode=TwoWay}"&gt;&lt;/TextBox&gt;
                  &lt;/DataTemplate&gt;
              &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;/DataGridTemplateColumn&gt;
          &lt;DataGridTemplateColumn Header="Y" Width="200"&gt;
              &lt;DataGridTemplateColumn.CellTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;TextBox Text="{Binding Path=Y, Mode=TwoWay}"&gt;&lt;/TextBox&gt;
                  &lt;/DataTemplate&gt;
              &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;/DataGridTemplateColumn&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p><strong>Note</strong> I have seen <a href="https://stackoverflow.com/questions/7847810/twoway-binding-on-a-datagrid-in-wpf">this</a> but my problem is different.</p>