How to enter EditMode on Cell Click

Posted by: john-shugart on 8 September 2017, 2:19 pm EST

  • Posted 8 September 2017, 2:19 pm EST

    I'm using FpSpread 4.0.2005.2005 and I want the cell to enter Edit mode when the user clicks on the cell. I have some spinners that enter EditMode when the user clicks on the cell, but the other cells won't enter EditMode until the cell is double clicked. How can I get the cell to enter EditMode on a single click?


    Thanks in advance,


    John

  • Replied 8 September 2017, 2:19 pm EST

    Hello,


     


    You may set the EditModePermanent property of Spread to true to achieve the desired scenario:


    fpSpread1.EditModePermanent = true;

  • Replied 8 September 2017, 2:19 pm EST

    thanks for the speedy reply Amit. I want some of my cells to be editable and others to not be editable, will setting this property allow me to accomplish this?


     Thanks again,


    John

  • Replied 8 September 2017, 2:19 pm EST

    Hello,

    You may set the lock property to true for the cells which you don't want to get into edit mode and set the edit mode "on" in Cell click event.

    e.g.

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            FpSpread1.ActiveSheet.Cells(0, 0, 2, 2).Locked = True
        End Sub

        Private Sub FpSpread1_CellClick(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.CellClickEventArgs) Handles FpSpread1.CellClick
            FpSpread1.EditModePermanent = True
        End Sub

     

    Thanks,

     

Need extra support?

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

Learn More

Forum Channels