title: WPF Binding a textbox to Current selected row of a datagrid
body: <p>I've looked and can't quite find what I'm looking for.  I have a MVVM environment.  On the View model, I have a Datatable available from data from a database connection/query.  I've exposed a property (getter/setter) as a "DataView" based on "TheTable.DefaultView".</p>
  
  <p>I have a datagrid in the window that binds to the dataview... no problem.</p>
  
  <pre><code>&lt;DataGrid AutoGenerateColumns="False" 
     Name="dataMyData"
     ItemsSource="{Binding Path=ViewModelViewProperty, 
     NotifyOnSourceUpdated=True, 
     NotifyOnTargetUpdated=True}"
     SelectedItem="{Binding Path=JustOneRecordInView, Mode=TwoWay}"
     SelectionMode="Single"
     SelectionUnit="FullRow"
     GridLinesVisibility="Horizontal"
     CanUserDeleteRows="False"
     CanUserAddRows="False" &gt;
  </code></pre>
  
  <p>For the "SelectedItem" above, it too comes from a property exposed on the ViewModel via its (getter/setter).</p>
  
  <p>Now, my problem.  As I scroll down the list of records in the data grid, I have other textbox controls to show more data than just the grid listing provides.  I want to be able to edit the data of "the current row", so I have a textbox with as many settings as I can think of, but something is still amiss.</p>
  
  <pre><code>&lt;TextBox 
     Text="{Binding Path=PropertyForCurrentRecord[SpecificColumnInDataViewRow], 
          Mode=TwoWay, 
          UpdateSourceTrigger=PropertyChanged, 
          ValidatesOnDataErrors=True, 
          ValidatesOnExceptions=True,
          BindsDirectlyToSource=True,
          NotifyOnSourceUpdated=True,
          NotifyOnTargetUpdated=True,
          NotifyOnValidationError=True}"
      Name="textBox1" VerticalAlignment="Top" Width="40" /&gt;
  </code></pre>
  
  <p>If I scroll though and am in an edit mode of the data, and change the value in the textbox associated with the current row, AND this value is one of the columns being displayed in the grid, the datagrid itself DOES NOT show the changed value.  However, if I DO continue to scroll off and back on the same record, the value in the textbox DOES show the changed to value.</p>
  
  <p>So, how can I force that the grid data source is considered updated too as the individual column from the specific row has changed, and the grid itself updated too.   Thanks...</p>