Spread Windows Forms 9.0 Product Documentation
Protect Property
Example 


Gets or sets whether cells on this sheet that are marked as locked are not editable.
Syntax
'Declaration
 
Public Property Protect As Boolean
'Usage
 
Dim instance As SheetView
Dim value As Boolean
 
instance.Protect = value
 
value = instance.Protect
public bool Protect {get; set;}

Property Value

Boolean: true if cells marked as locked are uneditable; false otherwise
Remarks

You can specify that certain cells are locked; that is, the user cannot edit them. In addition, locked cells can display different background and text colors. You mark cells as locked using the Lock property. Cells are not locked until the Protect property is set to true. Because the default value is true, unless you have changed the value of the Protect property, when you mark cells as locked, they are immediately locked.

When the Protect property is set to false, the user can still interact with cells marked as locked.

Example
This example sets cells that are marked as locked to still be editable by the user.
fpSpread1.ActiveSheet.Protect = false;
FpSpread1.ActiveSheet.Protect = False
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetView Class
SheetView Members
Locked Property (Cell)

User-Task Documentation

Locking a Cell

 

 


Copyright © GrapeCity, inc. All rights reserved.