This question is locked. New answers and comments are not allowed.
I'm having an issue with upgrading my existing application to use the latest release of the GridView. The following sample shows my issue. Essentially, I'm trying to show a ContextMenu using the Ctrl+Left Click Modifier. I cannot get the context menu to show on the rows or headers, it seems like there is another control handling the event.
And here is my code-behind.
<UserControl x:Class="Telerik_Q2_2010_Samples.MainPage" xmlns:c="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" xmlns:grid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot" Margin="30"> <grid:RadGridView ItemsSource="{Binding}" AutoGenerateColumns="False"> <c:RadContextMenu.ContextMenu> <c:RadContextMenu ModifierKey="Control" EventName="MouseLeftButtonDown"> <c:RadMenuItem Header="Test" /> </c:RadContextMenu> </c:RadContextMenu.ContextMenu> <grid:RadGridView.Columns> <grid:GridViewDataColumn Header="FirstName" Width="*" IsReadOnly="True" DataMemberBinding="{Binding FirstName}" /> <grid:GridViewDataColumn Header="LastName" Width="*" IsReadOnly="True" DataMemberBinding="{Binding LastName}" /> </grid:RadGridView.Columns> </grid:RadGridView> </Grid> </UserControl> And here is my code-behind.
using System.Collections.Generic; using System.Windows.Controls; namespace Telerik_Q2_2010_Samples { public partial class MainPage : UserControl { public List<Customer> Customers { get; set; } public MainPage() { InitializeComponent(); Customers = new List<Customer>() { new Customer { FirstName = "John", LastName="Doe" } }; DataContext = Customers; } } public class Customer { public string FirstName { get; set; } public string LastName { get; set; } } } 