Gets or sets whether cells in this column are marked as locked.
Syntax
Visual Basic (Declaration) | |
---|
Public Property Locked As Boolean |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As Column
Dim value As Boolean
instance.Locked = value
value = instance.Locked |
C# | |
---|
public bool Locked {get; set;} |
Property Value
Boolean:
true if marked as locked;
false otherwise
Remarks
Example
This example locks the cells in the column so they cannot be edited when the Protect property is set to True.
C# | Copy Code |
---|
FarPoint.Win.Spread.Column col;
int i, j;
col = fpSpread1.ActiveSheet.Columns[0, 2];
col.Locked = true;
for (i = 0; i <= col.Index2; i++)
{
for (j = 0; j <= fpSpread1.ActiveSheet.RowCount - 1; j++)
fpSpread1.ActiveSheet.Cells[j, i].Text = "Locked";
} |
Visual Basic | Copy Code |
---|
Dim col As FarPoint.Win.Spread.Column
Dim i, j As Integer
col = FpSpread1.ActiveSheet.Columns(0, 2)
col.Locked = True
For i = 0 To col.Index2
For j = 0 To FpSpread1.ActiveSheet.RowCount - 1
FpSpread1.ActiveSheet.Cells(j, i).Text = "Locked"
Next j
Next i |
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