title: Why isn't my Silverlight Datagrid Delete Button firing the event?
body: <p>I have datagrid with a delete button XAML looks like:</p>
  
  <pre><code>&lt;sdk:DataGridTemplateColumn Header="Del/Tgl" &gt;
      &lt;sdk:DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Button Content="Delete" 
             Command="{Binding DeleteRowCommand}"
                      CommandParameter="{Binding Column}"
                      /&gt;
          &lt;/DataTemplate&gt;
      &lt;/sdk:DataGridTemplateColumn.CellTemplate&gt;
  &lt;/sdk:DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>I implemented ICommand as DelegateCommand by copying the code from John Papa. I added a public property to my ViewModel :</p>
  
  <pre><code>public ICommand DeleteRowCommand {get;set;}
  </code></pre>
  
  <p>In the constructor of my viewModel I set the command:</p>
  
  <pre><code>this.DeleteRowCommand = new DelegateCommand(onDelete, CanDelete);
  </code></pre>
  
  <p>and finally defined the <code>onDelete</code>, and <code>CanDelete</code>:</p>
  
  <pre><code>private void onDelete(object param)
  {
      // Get the Column Name
      string strColumnName = param as string ?? string.Empty;
  }
  
  private bool CanDelete(object param)
  {
      // If we ae here we can delete the row
      return true;
  }
  </code></pre>
  
  <p>Everything works on my Silvelight grid but the delete button click, and I never go to <code>onDelete</code> function. What am I doing wrong?</p>