Is there a way for a right click event to select a row in toolkit datagrid?
I\'m using toolkit context menu which works nicely, but the problem is, only left click i
I tried a slightly different approach using the LoadingRow event in the DataGrid. I don't like using that particular event if I don't have to, but since I wasn't working with large amounts of data, it works out pretty well. The only thing I don't have in this sample is the command to use to perform the action. You could use a command on the DataContext object or some other mechanism.
private void DataGrid_LoadingRow(object sender, DataGridRowEventArgs e)
{
var contextMenu = new ContextMenu();
var deleteMenuItem = new MenuItem {Header = "Delete User"};
contextMenu.Items.Add(deleteMenuItem);
ContextMenuService.SetContextMenu(e.Row, contextMenu);
}