Context menu event not triggered when right clicking some cells

2 posts, 0 answers
  1. Johan
    Johan avatar
    2 posts
    Member since:
    Feb 2013

    Posted 21 Feb 2013 Link to this post

    In my RadGridView I capture the DropDownOpening events to pop up my own context menu like this:
    this.ContextMenuGrid.DropDownOpening += new System.ComponentModel.CancelEventHandler (this.ContextMenuGrid_DropDownOpening);


    One of the columns in the grid contains self references added like this

     

    radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "Id", "AktivitetRef");



    So, I get plus icons in the cells where references are available. When the cells containing the plus icon are right clicked, the event is triggered and I generate the context menu I want, but when other cells in that column are right clicked, the event is not triggered and a default context menu is displayed.

    Why is the event not triggered? Any idea?

  2. Stefan
    Admin
    Stefan avatar
    2911 posts

    Posted 26 Feb 2013 Link to this post

    Hi Johan,

    Thank you for writing.

    I am not quite sure that I understand how you have setup your context menu, however, the correct way to handle context menus in RadGridView to use the ContextMenuOpening event. Please refer to the following documentation section for more details: http://www.telerik.com/help/winforms/gridview-context-menus-custom-context-menus.html.

    If you continue experiencing issues, please get back to me with information how can I reproduce the exact scenario and I will help you with it.

    All the best,
    Stefan
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top