title: Forcing IDataErrorInfo.this[string columnName] to be called so that a validation tooltip is updated
body: <p>I have a tricky problem with a WPF data grid and validation error tooltips not updating when validation messages change. This is with .Net 4 code, so I can't use <strong>INotifyDataErrorInfo</strong>.</p>
  
  <p>I have an <strong>ObservableCollection</strong> bound to a datagrid. The object type in the collection implements <strong>IDataErrorInfo</strong> so that we can support validation and highlight fields that have invalid values. This works fine in most cases. However, there are issues with the message that is displayed in the tooltip in the following scenario:</p>
  
  <ol>
  <li>Field A has two rules Rule 1 and Rule S (a shared rule)</li>
  <li>Field B has one rule Rule S (the shared rule)</li>
  <li>Rule S is a shared rule than references both Field A and Field B</li>
  <li><p>If Rule 1 and Rule S are both invalid, we get the following validation tooltips shown for each field, which is the behaviour we want:</p>
  
  <pre><code>Field A &lt; "Rule 1 is invalid. Rule S is invalid"
  Field B &lt; "Rule S is invalid"
  </code></pre></li>
  <li><p>If we now edit field B to make Rule S valid. We want both the tooltip messages to update as follows:</p>
  
  <pre><code>Field A &lt; "Rule 1 is invalid."
  Field B &lt; (valid - no tooltip)
  </code></pre></li>
  </ol>
  
  <p>Note, the validation state of field A has not changed (Validation.HasError does not change value), only the message bound to the tooltip. </p>
  
  <p>What we actually see is:</p>
  
  <pre><code>Field A &lt; "Rule 1 is invalid. Rule S is invalid"
  Field B &lt; (valid - no tooltip)
  </code></pre>
  
  <p>NB the underlying ValidationError data on the class instance is correct at this point.</p>
  
  <p>It appears that the UI will not update the tooltip text for field A unless we force it to requery the state and call IDataErrorInfo.this[string columnName] again. The only way I have found to force this to happen is to manually raise the property changed event for field A. However, I don't want to have to do this since the value of field A hasn't actually changed, only the bound error messages. While this solution works the extra and unnecessary property changed events play havok with the performance with lots of data. </p>
  
  <p>What can I do to force IDataErrorInfo.this[string columnName] to be called for field B without having to go as far as raising a property changed event?</p>
  
  <p>NB here's the error data template we use to display the validation message.</p>
  
  <pre><code>    &lt;!-- ERROR HANDLING Data Template --&gt;
      &lt;Style x:Key="controlBaseStyle"
             TargetType="{x:Type Control}"&gt;
  
          &lt;Setter Property="Validation.ErrorTemplate"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate&gt;
                      &lt;Border BorderBrush="Red" 
                              BorderThickness="2"
                              Visibility="{Binding ElementName=placeholder, Path=AdornedElement.IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}"&gt;
                          &lt;AdornedElementPlaceholder x:Name="placeholder"/&gt;
                      &lt;/Border&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
  
          &lt;Setter Property="ToolTipService.ShowOnDisabled" Value="true"/&gt;
  
          &lt;Style.Triggers&gt;
              &lt;Trigger Property="Validation.HasError" Value="true"&gt;
                  &lt;Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors).CurrentItem, Converter={StaticResource ErrorContentConverter}}"/&gt;
              &lt;/Trigger&gt;
  
  
              &lt;!--We don't want to see the validation if the control is disabled.  This doesn't affect it if the control is read only. --&gt;
              &lt;Trigger Property="IsEnabled" Value="False"&gt;
                  &lt;Setter Property="Validation.ErrorTemplate"&gt;
                      &lt;Setter.Value&gt;
                          &lt;ControlTemplate&gt;
                              &lt;AdornedElementPlaceholder x:Name="placeholder"/&gt;
                          &lt;/ControlTemplate&gt;
                      &lt;/Setter.Value&gt;
                  &lt;/Setter&gt;
              &lt;/Trigger&gt;
          &lt;/Style.Triggers&gt;
  
      &lt;/Style&gt;
  </code></pre>