title: Button enbale/disable (inside Datagrid view ) based on value from Database -WPF
body: <p>In WPF window, Data grid view will load from database.</p>
  
  <p>This is the design code for Data grid view.(It contains 2 columns - Name, Action)</p>
  
  <pre><code>&lt;DataGrid x:Name="dgrid" HorizontalAlignment="Left" Margin="0,65,0,0" VerticalAlignment="Top" &gt;
          &lt;DataGrid.Columns&gt;
              &lt;DataGridTextColumn Header="Name"  Binding="{Binding Name}"  Width="160"&gt;&lt;/DataGridTextColumn&gt;
              &lt;DataGridTemplateColumn Header="Action" Width="*"&gt;
                  &lt;DataGridTemplateColumn.CellTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;StackPanel Orientation="Horizontal"&gt;
                              &lt;Button Name="btnEdit" Content="Edit" /&gt;
                              &lt;Button Name="btnDelete" Content="Delete" /&gt;
                              &lt;Button Name="btnActivate" Content="Activate" /&gt;
                              &lt;Button Name="btnDeactivate" Content="Deactivate" /&gt;
                          &lt;/StackPanel&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/DataGridTemplateColumn.CellTemplate&gt;
              &lt;/DataGridTemplateColumn&gt;
  
          &lt;/DataGrid.Columns&gt;
      &lt;/DataGrid&gt;
  </code></pre>
  
  <p>Name column bind the value from data base value, and following column contain 4 buttons!
  <a href="https://i.stack.imgur.com/YYDas.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YYDas.png" alt="enter image description here"></a></p>
  
  <p>what I need to do this, based on another column value of database (for example Activation Status) , the btnActivate, btnDeactivate should set their
  is Enable property!
  how can I accomplish this?</p>
  
  <p>Thanks in Advance</p>