title: DataGrid MultiDataTrigger Bind to a ViewModel Property
body: <p>I have a View in MVVM WPF project. I have a DataGrid in the Page bound to a DataView (from a DataTable). What I need is to use MultiDataTrigger for the background color of the DataGrid Rows, that should be redefined by True value of the ViewModel Property:</p>
  
  <pre><code> public bool IsAutorized
   {
       get { return _isAutorized; }
       set
       {
           _isAutorized = value;
           OnNotifyPropertyChanged("IsAutorized");
       }
   }
  </code></pre>
  
  <p>Whereas a True value is a property of DataRow. This is what I have now and the binding to the ViewModel property is not correct, when I set a breakpoint on the property get it is not "caught".</p>
  
  <pre><code>&lt;Style.Triggers&gt;
  &lt;Trigger Property="DataGridRow.IsSelected" Value="True"&gt;
      &lt;Setter Property="Background" Value="#CCDAFF"/&gt;
  &lt;/Trigger&gt;
  
  &lt;MultiDataTrigger&gt;
      &lt;MultiDataTrigger.Conditions&gt;                                                                       
          &lt;Condition Binding="{Binding Path=IsAutorized,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Page}}" Value="True" /&gt;
          &lt;Condition Binding="{Binding RelativeSource={RelativeSource Self},Path=IsNotSpecific}"  Value="True" /&gt;
      &lt;/MultiDataTrigger.Conditions&gt;
      &lt;Setter Property="Background" Value="#CCF4FF" /&gt;
  &lt;/MultiDataTrigger&gt;  &lt;/Style.Triggers&gt;
  </code></pre>
  
  <p>The Binding issues are very confusing, I've tried googleing it but found nothing. Any Ideas hot to do it?</p>
  
  <p>Thank you.</p>
  
  <p>--
  EDIT:</p>
  
  <p>"IsNotSpecific" and "IsSelected" are both Colmns in the DataView, that is taken from the DataTable, a Strongly Typed DataSet table.</p>
  
  <p>When a row is selected the field / column "IsSelected" is set to true and a certain color is triggerd. When the View property "IsAutorized" is set to true and the DataRow (from the DataTable) "IsNotSpecific" column are set to "True", a different color should be displayed.</p>