title: WPF XAML DataGrid - update the value of one column based on that of another
body: <p>I have a DataGrid which features a CombBox column and an Item column. The drop down is a CollectionView with &quot;START&quot; and &quot;NONE&quot; in. If &quot;START&quot; is selected then a command is raised to allow the user to select an item which is assigned to a Button in the Item column (Which can be clicked to allow re-selection).</p>
  <p>I'd like it so that if &quot;NONE&quot; is selected, this Button is removed - preferable if the underlying ViewModel is updated appropriately - and that the other column is greyed out and disabled. I can do the latter but I'm not sure how to do the former.</p>
  <p>It's also not good enough that the button is just hidden - I need the underlying &quot;Item&quot; to no longer bassigned to it.</p>
  <p>Here is what my XAML looks like:</p>
  <pre><code>&lt;DataGrid.Columns&gt;
      &lt;DataGridComboBoxColumn Header=&quot;My Cmnd&quot; Width=&quot;*&quot;
      SelectedItemBinding=&quot;{Binding MY_COMMAND,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}&quot;
      ItemsSource=&quot;{Binding Source={StaticResource MyCmndTypesCVS}}&quot;  /&gt;
      &lt;DataGridTemplateColumn Header=&quot;Item Name&quot;&gt;
          &lt;DataGridTemplateColumn.CellTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Button Content=&quot;{Binding MyName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}&quot;
                          Command=&quot;{Binding Path=DataContext.SelectMyCommand,
                              RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}&quot;/&gt;
              &lt;/DataTemplate&gt;
          &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataGridTemplateColumn.CellStyle&gt;
              &lt;Style TargetType=&quot;DataGridCell&quot; &gt;
                  &lt;Setter Property=&quot;IsEnabled&quot; Value=&quot;True&quot; /&gt;
                  &lt;Style.Triggers&gt;
                      &lt;DataTrigger Binding=&quot;{Binding MY_COMMAND}&quot; Value=&quot;NONE&quot;&gt;
                          &lt;Setter Property=&quot;IsEnabled&quot; Value=&quot;False&quot; /&gt;
                          &lt;Setter Property=&quot;Background&quot; Value=&quot;Gray&quot; /&gt;
                          &lt;Setter Property=&quot;BorderBrush&quot; Value=&quot;Gray&quot; /&gt;                                                                
                      &lt;/DataTrigger&gt;                                  
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/DataGridTemplateColumn.CellStyle&gt;
      &lt;/DataGridTemplateColumn&gt;
  &lt;DataGrid.Columns&gt;
  </code></pre>
  <p>Is there a way to get the DataTrigger to set an underlying ViewModel property to null?</p>