This is a migrated thread and some comments may be shown as answers.

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

4 Answers 85 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Misha
Top achievements
Rank 1
Misha asked on 25 Aug 2012, 09:14 PM

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

4 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 27 Aug 2012, 12:13 PM
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.

0
Misha
Top achievements
Rank 1
answered on 27 Aug 2012, 05:56 PM
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
0
Ken
Top achievements
Rank 1
answered on 20 Sep 2012, 09:28 AM
Looks like this bug is still not fixed in SP2. Can you please confirm this?
0
Yana
Telerik team
answered on 20 Sep 2012, 01:25 PM
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.

Tags
Menu
Asked by
Misha
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Misha
Top achievements
Rank 1
Ken
Top achievements
Rank 1
Yana
Telerik team
Share this question
or