Spread Windows Forms 6.0 Product Documentation
Protect Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class : Protect Property


Glossary Item Box

Gets or sets whether cells on this sheet that are marked as locked are uneditable.

Syntax

Visual Basic (Declaration) 
Public Property Protect As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As Boolean
 
instance.Protect = value
 
value = instance.Protect
C# 
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.
C#Copy Code
fpSpread1.ActiveSheet.Protect = false;
Visual BasicCopy Code
FpSpread1.ActiveSheet.Protect = False

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.