Unable to disable rows in WPF DataGrid using Style trigger
<p>I want to disable rows based on a property "IsEditable". </p>

<p>This is my <code>RowStyle</code></p>

<pre><code>&lt;Style TargetType="{x:Type DataGridRow}"&gt;
    &lt;Setter Property="IsEnabled" Value="True"/&gt;
    &lt;Style.Triggers&gt;
        &lt;DataTrigger Binding="{Binding IsEditable}" Value="False"&gt;
             &lt;Setter Property="IsEnabled" Value="False" /&gt;
        &lt;/DataTrigger&gt;
    &lt;/Style.Triggers&gt;
&lt;/Style&gt;
</code></pre>

<p>I have implemented <code>INotifyPropertyChanged</code>.</p>

<p>I'm able to disable the entire grid using the same property but I'm unable to disable rows. </p>

<p>"IsEditable" property is defined in my ViewModel. My datacontext is also the ViewModel. </p>

<p>This is my grid code</p>

<pre><code> &lt;DataGrid RowHeaderWidth="0" MouseDoubleClick="listViewItem_MouseDoubleClick"  
                      AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Extended" SelectionUnit="FullRow" 
                      BorderBrush="#FF898C95" ItemsSource="{Binding EqpGrpList}" CanUserSortColumns="False" HorizontalGridLinesBrush="#FFDEDBDB"
                      VerticalGridLinesBrush="#FFDEDBDB" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                      Margin="0,-5,0,0" Background="White" CellStyle="{StaticResource DataGridCellStyle}"&gt;

              &lt;DataGrid.Columns...&gt;

  &lt;/DataGrid&gt;
</code></pre>

<p>I have included the row style in <code>UserControl.Resources</code>.</p>