Bind datagrid button mvvm
05:27 11 Aug 2019

I have datagrid, one of it's columns is buttons column, I want to bind this click to viewmodel, but it doesn't reach to the view model function.


                        
       
            
                 
                    
                 
             
         
   

And in the viewmodel:

public ICommand DeleteCommentCommand { get; private set; }
public MyViewModel()
{
   DeleteCommentCommand = new RelayCommand(Delete);
}

void Delete()
{
}

I have a feeling that the problem is in this line:

 
c# wpf xaml mvvm