title: How to bind a button on wpf grid to a method on MVVM when I am using caliburn micro
body: <p>I have a Grid on a wpf window which I want to add the capability that user can delete some of the items by clicking on a delete button. The application uses Calibrun Micro to bind view to ViewModel. </p>
  
  <p>My question?</p>
  
  <p>1- Is it a good idea to use a button to delete an item from a grid in WPF?</p>
  
  <p>2- How can I bind a button to a method on VM and in the methd get a pointer to the item that should be deleted?</p>
  
  <h2><strong>Edit1</strong></h2>
  
  <p>I added the buttons in this way to datagrid:</p>
  
  <pre><code>&lt;DataGridTemplateColumn Width="100"&gt;
      &lt;DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Button Content="Delete" cal:Message.Attach="DeleteFromList($dataContext)" /&gt;
           &lt;/DataTemplate&gt;
       &lt;/DataGridTemplateColumn.CellTemplate&gt;
   &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>and c# code follow:</p>
  
  <pre><code> public void DeleteFromList(object tmp)
      {
  
      }
  </code></pre>
  
  <p>But the buttons on datagrid are disabled and clicking on them doesn't fire DeleteFromList method (I checked using debugger).</p>
  
  <p>Why they are disabled? How can I make them enabled?</p>