Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / FpSpread Class / EditModePermanent Property
Example


In This Topic
    EditModePermanent Property (FpSpread)
    In This Topic
    Gets or sets whether edit mode remains on for any cell in the component when that cell becomes active.
    Syntax
    'Declaration
     
    Public Property EditModePermanent As Boolean
    'Usage
     
    Dim instance As FpSpread
    Dim value As Boolean
     
    instance.EditModePermanent = value
     
    value = instance.EditModePermanent
    public bool EditModePermanent {get; set;}

    Property Value

    Boolean: true if a cell is in edit mode whenever it becomes the active cell; false otherwise
    Remarks

    If this property is set to true, when any cell in the spreadsheet becomes the active cell, it immediately enters edit mode. In effect, setting this property to true creates a spreadsheet with cells that do not display the focus rectangle. You can use this option to emulate a table of editor controls.

    When this property is set to true, every time you move the active cell, the EditMode event occurs twice: when you leave the current active cell and when you move to the new active cell.

    When edit mode is on, no selections are possible. Refer to Hiding Selection and Focus Rectangle.

    Note: Setting this property to true automatically sets the SelectionBlockOptions property to 0. If you then set this property to false, you must reset the SelectionBlockOptions property to its original setting.

    Tip: If you set this property to true, you might want to set the EditModeReplace property to false to prevent users from accidentally deleting their data.

    For a discussion of edit mode and related properties, refer to Understanding Edit Mode.

    Example
    This example specifies whether a cell is in edit mode whenever it becomes the active cell.
    FarPoint.Win.Spread.FpSpread fpSpread1 = new FarPoint.Win.Spread.FpSpread();
    FarPoint.Win.Spread.SheetView shv = new FarPoint.Win.Spread.SheetView();
    fpSpread1.Location = new Point(10, 10);
    fpSpread1.Height = 200;
    fpSpread1.Width = 400;
    Controls.Add(fpSpread1);
    fpSpread1.Sheets.Add(shv);
    fpSpread1.EditModePermanent = true;
    Dim fpSpread1 As New FarPoint.Win.Spread.FpSpread()
    Dim shv As New FarPoint.Win.Spread.SheetView()
    fpSpread1.Location = New Point(10, 10)
    fpSpread1.Height = 200
    fpSpread1.Width = 400
    Controls.Add(fpSpread1)
    fpSpread1.Sheets.Add(shv)
    fpSpread1.EditModePermanent = True
    See Also