RadContextMenu not closing after click

9 posts, 0 answers
  1. Paresh Hirapara
    Paresh Hirapara avatar
    5 posts
    Member since:
    Feb 2007

    Posted 17 Apr 2011 Link to this post

    We are using RadContextMenu inside WPF RadGridview. We have few menu items. When i click on a menuitem we do some processing. 

    It is not closing after click. Do i have to close it manually?

    We are using Telerik.Windows.Controls.dll file version 2011.1.315.40.

    Thanks
    Ram
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 19 Apr 2011 Link to this post

    Hello Paresh,

    We are not aware of such issue. Could you please try to reproduce it in a sample project and send it to us. In that way we will be able to track down the source of the problem and provide you with solution.

    Looking forward to your reply.

    Best wishes,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Mike Henders
    Mike Henders avatar
    11 posts
    Member since:
    May 2006

    Posted 22 Apr 2011 Link to this post

    I too have just started seeing this problem after installing Q1 2011 SP1.  When I have more information or a sample I will post it here. It is not occurring on all my RadGridView context menus, just some.

    Cheers,
    Mike
  5. Mike Henders
    Mike Henders avatar
    11 posts
    Member since:
    May 2006

    Posted 22 Apr 2011 Link to this post

    Revision to my previous post. It was a stupid mistake of putting a plain MenuItem in the RadContextMenu instead of a RadMenuItem.  I suspect this didn't work in the previous build either but nobody noticed until testing after upgrading to SP1.

    It would be nice if you added a GridContextMenu.Close() method.

    Cheers,
    Mike
  6. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 25 Apr 2011 Link to this post

    Hello Mike,

    We are glad that the issue is resolved.

    We will consider adding such property if we receive enough clients' requests.

    All the best,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Michael Blanchet
    Michael Blanchet avatar
    21 posts
    Member since:
    Sep 2009

    Posted 03 Jul 2012 Link to this post

    There definitely needs to be a close method on the context menu.

    The problem arises when you have a menu item that takes you through a progression of states. If the user accidently presses the mouse button twice, without a menu close mechanism, two events will be triggered instead of one.

    This is a significant issue.  Using Q2 2012
  8. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 06 Jul 2012 Link to this post

    Hello,

    I have logged this feature request in PITS, where you could vote for it and track its status. The more votes it receives the sooner it will be implemented.

    Kind regards,
    Konstantina
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  9. Chuck
    Chuck avatar
    9 posts
    Member since:
    Jan 2013

    Posted 09 May 2014 Link to this post

    I found this to work for a class that inherits from RadContextMenu:

    this.IsOpen = false;

    I'd added a textbox and a button to the control and needed to close the context menu when the button was pressed.

    This is my full button click event if it helps anyone:

    void ButtonSet_Click(object sender, RoutedEventArgs e)
    {
        Button b = (Button)sender;
        StackPanel stack = b.GetVisualParent<StackPanel>();
        TextBox tb = stack.ChildrenOfType<TextBox>().First();
        int value;
        if (int.TryParse(tb.Text, out value))
        {
            ... code to process int ...
            this.IsOpen = false;
        }
    }

  10. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 10 May 2014 Link to this post

    Hi Chuck,

    RadContextMenu will be closed when you click outside of it or when you click on one of its RadMenuItems. If you have added a button inside RadMenuItem, when you click it, you have to manually close RadContextMenu by setting its IsOpen property to false, as you have mentioned in your post.

    Hope this helps. Feel free to contact us in case you have any problems or concerns.

    Regards,
    Rosen Vladimirov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
UI for WPF is Visual Studio 2017 Ready