Where in designer is the Click event hiding?

9 posts, 0 answers
  1. Dave Plummer
    Dave Plummer avatar
    10 posts
    Member since:
    Jan 2005

    Posted 13 Jun 2011 Link to this post

    I have a RadContextMenu with a half-dozen items; I cannot for the life of me find the events for menu items.  I'm in the "RadItem Collection Editor", and my six menu items are listed, but I have ONLY properties (Accessibility, Appearance, Behavior, etc) on the right.  There is no "Events" lightning bolt in the property editor toolbar.

    There ARE events for the RadContextMenu itself, but only for "DropDownClosed/Closing/Opened/Opening".  So how do I, in the designer, set the handler for a context menu's menuitem click event?

    Thanks!
    Dave

    (VS 2010 SP1)
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 15 Jun 2011 Link to this post

    Hi Dave,

    You cannot attach to an event when using a collection editor. You can do this only from the property grid pane. To do this, show the property grid pane and then select a menu item by navigating to the drop-down list of the property grid. Then select the events page in the property grid. There you will find listed all events supported by RadMenuItem.


    I hope this helps. If you need further assistance, do not hesitate to contact us.
     
    Best wishes,
    Jack
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Brian Bates
    Brian Bates avatar
    3 posts
    Member since:
    Aug 2006

    Posted 03 May 2012 Link to this post

    Thanks, I needed help on this too.  This little tip should probably be added to the documentation.  : )
  5. Friedhelm
    Friedhelm avatar
    9 posts
    Member since:
    Jul 2012

    Posted 07 Aug 2012 Link to this post

    I don't found this event too.
    So I would agree to add this to the documentation!

    A better solution would be the visual way as implementet by Microsoft for the ContextMenuStrip.
    Best regards
    Friedhelm
  6. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 10 Aug 2012 Link to this post

    Hello Friedhelm,

    Thank you for writing.

    You can find the events of the items in RadContextMenu by selecting the desired item in the Properties window of Visual Studio and then by double clicking the desired event there - see the attached image in Jack's post. Alternatively, you can subscribe to the desired events in code:
    radMenuItem1.Click += new EventHandler(radMenuItem1_Click);
    ....
    void radMenuItem1_Click(object sender, EventArgs e)
    {
                 
    }

    Thank you for your suggestion regarding the design time of RadContextMenu. If we receive more requests about the same, we will consider its implementation.
     
    All the best,
    Stefan
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  7. Henrik
    Henrik avatar
    23 posts
    Member since:
    Feb 2012

    Posted 03 Sep 2014 in reply to Stefan Link to this post

    I too was struggling to find this solution..
    Please add it to the documentation (the first place most people would look, I think)
  8. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 03 Sep 2014 Link to this post

    Hello,

    One of the last steps of the Getting Started article shows how to subscribe to the Click event of a menu item. Here is a quote:
    - Go to the Design View of the form and select the 'New' menu item.
    - In the Properties window, click the events toolbar button.
    - Double-click the Click event.

    Do you guys think this would suffice or you need it explained someplace else?

    Regards,
    Stefan
    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.
     
  9. Robert Gray
    Robert Gray avatar
    4 posts
    Member since:
    Feb 2009

    Posted 09 Mar in reply to Stefan Link to this post

    Stefan, unfortunately that doesn't work with context menus.
  10. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 10 Mar Link to this post

    Hello Robert,

    Thank you for writing.

    Please refer to the attached sample video (drag and drop over the browser to play it) demonstrating how to subscribe to the Click event of a RadContextMenu's item.

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WinForms is Visual Studio 2017 Ready