ContextMenu selects wrong row if browser zoom is greater than 100%

6 posts, 0 answers
  1. Rob
    Rob avatar
    1 posts
    Member since:
    Sep 2010

    Posted 18 Jul 2011 Link to this post

    I have installed the latest version of the controls - 2011.2.712.1040 but the problem continues. When the Browser Zoom is set to any value higher than 100% the incorrect row, usually random, is identified with the right-click. When the mouse-click is released that incorrect row is selected:

    <UserControl x:Class="ContextMenu_Example.MainPage"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                 xmlns:my="clr-namespace:ContextMenu_Example"
                 mc:Ignorable="d" d:DesignHeight="700" d:DesignWidth="700">
        <UserControl.Resources>
            <my:MyViewModel x:Key="MyViewModel"/>
        </UserControl.Resources>
     <Grid x:Name="LayoutRoot"
              Background="White"
              DataContext="{StaticResource MyViewModel}">
      <Grid.RowDefinitions>
       <RowDefinition Height="*"/>
       <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <telerik:RadGridView Name="playersGrid"
                                         ItemsSource="{Binding Players}"
                                         AutoGenerateColumns="False">
       <telerik:RadGridView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Number}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Position}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Country}"/>
       </telerik:RadGridView.Columns>
       <telerik:RadContextMenu.ContextMenu>
        <telerik:RadContextMenu ItemClick="RadContextMenu_ItemClick" Opened="RadContextMenu_Opened">
         <telerik:RadContextMenu.Items>
          <telerik:RadMenuItem Header="Add"/>
          <telerik:RadMenuItem Header="Edit"/>
          <telerik:RadMenuItem Header="Delete"/>
         </telerik:RadContextMenu.Items>
        </telerik:RadContextMenu>
       </telerik:RadContextMenu.ContextMenu>
      </telerik:RadGridView>
     </Grid>
    </UserControl>

    The compressed size of the project exceeds the upload limit but I would be happy to send them to you if you have another method.

    I must comment that the upgrade process is excellent in that I just opened the project after installing the new version and the references were updated! Nice Work!
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 19 Jul 2011 Link to this post

    Hello Rob,

    Thank you for the kind words about our upgrade process.

    RadContextMenu GetClickedElement is using VisualTreeHelper.FindElementsInHostCoordinates method.
    This method have a bug and when browser is zoomed - it returns the element which is under the mouse but without zooming (e.g. zoom 100%). It is reported in the Metro Connect site but still there is no fix.

    Greetings,
    Hristo
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
  4. John
    John  avatar
    2 posts
    Member since:
    Aug 2011

    Posted 15 Sep 2011 Link to this post

    Is there an update on this?  Microsoft opened a ticket on this last spring, and we are in the middle of an eval of radgridview now and are surprised this is still an issue.  It is a sticking point for our customer.
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 20 Sep 2011 Link to this post

    Hi John ,

    We talked to Microsoft about this issue and we hope that it will be fixed in the final version of Silverlight 5.

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. John
    John  avatar
    2 posts
    Member since:
    Aug 2011

    Posted 29 Sep 2011 Link to this post

    Hi,

    I believe Rob above was the Microsoft support person we had originally talked to about this issue.  When Microsoft closed our ticket with them they indicated that the problem was with Telerik, and that he had even sent the fix to Telerik.  But it had to be made BY Telerik.  So it sounded like the issue was yours to fix.  Their native grid does not have this issue.  So I'm not sure what fix to Silverlight I should be waiting for.
  7. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 04 Oct 2011 Link to this post

    Hi John ,

    Like I said in my previous post this is a problem in the framework.

    I've attached sample project demonstrating the problem. Currently there is no workaround but I think that it will be fixed in the final version of Silverlight 5.

    Regards,
    Hristo
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner