Context Menu Issue

Posted by: kunal-mi-17 on 8 September 2017, 12:30 pm EST

  • Posted 8 September 2017, 12:30 pm EST

    Hi,


    In my spread i am getting a Context Menu popup when i make the cell editable and then right click on it. Also in my form there are some other controls as well, i want the context menu to be disabled only for the spread and for no other control.


    When i say disabled.. i mean on right clicking on a cell , i want no action to be performed.No Popup should come up. What do i do to make this working the way i want.


    Is there any property which i can set to make these disable?


    ~ Kunal

  • Replied 8 September 2017, 12:30 pm EST

    Try using the FpSpread1_CellClick event:

    If e.Button = MouseButtons.Right Then
    e.Cancel = True
    End If

    This will cancel any right-clicking on the Spread control. Does this work for you?
  • Replied 8 September 2017, 12:30 pm EST

    That is not working, I am making the cell editable by double clicking on that cell , then if a right click on it the pop up still comes up.
  • Replied 8 September 2017, 12:30 pm EST

    Kunal,


    To get the ContextMenu off on the editor in the cell, you need to get that control and set the AutoMenu property to False.

     
      Private Sub FpSpread1_EditModeOn(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.EditModeOn
    Dim c As FarPoint.Win.Spread.CellType.GeneralEditor
    c = FpSpread1.EditingControl
    c.AutoMenu = False
    End Sub

     
  • Replied 8 September 2017, 12:30 pm EST

    Hi Scott,


    Thanks a lot for your help .. that is working for me now....


    Regards,


    Kunal

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels