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.

     <PRE class=coloredcode> <SPAN class=kwd>Private Sub</SPAN> FpSpread1_EditModeOn(<SPAN class=kwd>ByVal</SPAN> sender <SPAN class=kwd>As Object</SPAN>, <SPAN class=kwd>ByVal</SPAN> e <SPAN class=kwd>As</SPAN> System.EventArgs) <SPAN class=kwd>Handles</SPAN> FpSpread1.EditModeOn
    <SPAN class=kwd>Dim</SPAN> c <SPAN class=kwd>As</SPAN> FarPoint.Win.Spread.CellType.GeneralEditor
    c = FpSpread1.EditingControl
    c.AutoMenu = <SPAN class=kwd>False
    End Sub</SPAN>
    </PRE> 
  • Replied 8 September 2017, 12:30 pm EST

    <FONT size=2>Hi Scott, </FONT>


    <FONT size=2>Thanks a lot for your help .. that is working for me now....</FONT>


    <FONT size=2>Regards,</FONT>


    <FONT size=2>Kunal</FONT>

Need extra support?

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

Learn More

Forum Channels