Cannot click on items in ContextMenu Out of Browser after applying Hotfix

5 posts, 0 answers
  1. Misha
    Misha avatar
    12 posts
    Member since:
    Aug 2012

    Posted 25 Aug 2012 Link to this post

    I currently have a RadGridView that I attach a context menu to. I subscribe to the ItemClick event and handle whatever was clicked in that method. This worked fine with RadControls for Silverlight Q2 2012, but after applying the RadControls for Silverlight5 2012 2 0813 hotfix, the functionality is partially broken.

    The functionality I want still works in-browser, but when running the application out of browser (OOB), clicking anywhere or pressing keys on a keyboard after opening the context menu (by right clicking on the GridView) causes the context menu to close. The closed event is never fired after clicking on the context menu, it is only fired if I click outside of the context menu. The context menu opening event always gets hit, but the item clicked event is only triggered when the application is running in browser.

    The only way I was able to keep the menu open and available to click on is by setting the ContextMenu property StaysOpen to true, but I do not want the menu to stay open like this. I checked the themes for the RadContextMenu and they look identical in both of these Telerik versions.

    Here is an example of the code behind (the xaml contains of 1 gridview named 'grid'):

    public MainPage() {
      InitializeComponent();
      RadContextMenu contextMenu = new RadContextMenu();
      contextMenu.Items.Add(new RadMenuItem { Header = "Item 1" });
      contextMenu.Items.Add(new RadMenuItem { Header = "Item 2" });
      contextMenu.Opening += ContextMenuOpeningHandler;
      contextMenu.ItemClick += ContextMenuItemClickHandler;
      RadContextMenu.SetContextMenu(grid, contextMenu);
    }
     
    private void ContextMenuItemClickHandler(object sender, RadRoutedEventArgs e) {
      new RadWindow { Content = "Item Clicked!" }.ShowDialog();
    }
     
    private void ContextMenuOpeningHandler(object sender, RadRoutedEventArgs e) {
      Debug.WriteLine("Context Menu Opening");
    }

    Any help or suggestions would be greatly appreciated.

    Thanks, Misha

  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 27 Aug 2012 Link to this post

    Hi,

    Thanks for reporting this bug. We have reproduced it and we'll try to fix it at our earliest. For now please use the official release where this bug is not present.

    Don't hesitate to contact us if you have any problems with RadControls.

    Kind regards,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Misha
    Misha avatar
    12 posts
    Member since:
    Aug 2012

    Posted 27 Aug 2012 Link to this post

    Thank you very much for your response Rosen. Unfortunately we need to use this hotfix to solve a bug with drag/drop OOB in MacOSX, therefore as a temporary fix we will put StaysOpen="True" and manually close the context menu when the item click event is raised.

    Thanks again!

    Regards,
    Misha
  5. Ken
    Ken avatar
    104 posts
    Member since:
    Aug 2010

    Posted 20 Sep 2012 Link to this post

    Looks like this bug is still not fixed in SP2. Can you please confirm this?
  6. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 20 Sep 2012 Link to this post

    Hello,

    We have just fixed this bug and it will be included in our next internal build, so you can check it by yourself next week.

    Regards,
    Yana
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Back to Top
DevCraft banner