Disable context menu

2 posts, 0 answers
  1. Arthur
    Arthur avatar
    32 posts
    Member since:
    May 2012

    Posted 22 Apr 2013 Link to this post


    I have a context menu used to add and remove rows. I also have the InsertRow present.

    I would like to know if its possible to disable the context menu when the user has used the InsertRow and has focused on the new row


  2. Yoan
    Yoan avatar
    1180 posts

    Posted 24 Apr 2013 Link to this post

    Hi Arthur,

    In order to achieve your goal you can handle Opening event of RadContextMenu and execute the following code:

    private void RadContextMenu_Opening(object sender, Telerik.Windows.RadRoutedEventArgs e)
                RadContextMenu menu = (RadContextMenu)sender;
                GridViewNewRow row = menu.GetClickedElement<GridViewNewRow>();
                if (row != null || this.clubsGrid.RowInEditMode !=null)
                    e.Handled = true;

    I hope this helps.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top