GrapeCity.Xaml.SpreadSheet.Data
Locked Property (Cell)
Example 


Gets or sets a value that indicates whether a cell is marked as locked from editing.
Syntax
'Declaration
 
<DefaultValueAttribute()>
Public Property Locked As Boolean
'Usage
 
Dim instance As Cell
Dim value As Boolean
 
instance.Locked = value
 
value = instance.Locked
[DefaultValue()]
public bool Locked {get; set;}

Property Value

true if the cell is locked; otherwise, false. The default value is true.
Example
This example uses the Locked property.
gcSpreadSheet1.Sheets[0].Cells[1, 1].Locked = false;
gcSpreadSheet1.Sheets[0].Cells[1, 1].Text = "Locked";
gcSpreadSheet1.Sheets[0].Columns[3].Locked = false;
gcSpreadSheet1.Sheets[0].Rows[5].Locked = false;
gcSpreadSheet1.Protect = true;
gcSpreadSheet1.Sheets[0].Protect = true;

private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            gcSpreadSheet1.Sheets[0].Cells[1, 1].ResetLocked();
        }
GcSpreadSheet1.Sheets(0).Cells(1, 1).Locked = False
GcSpreadSheet1.Sheets(0).Cells(1, 1).Text = "Locked"
GcSpreadSheet1.Sheets(0).Columns(3).Locked = False
GcSpreadSheet1.Sheets(0).Rows(5).Locked = False
GcSpreadSheet1.Protect = True
GcSpreadSheet1.Sheets(0).Protect = True

Private Sub Button_Click_1(sender As Object, e As RoutedEventArgs)
GcSpreadSheet1.Sheets(0).Cells(1, 1).ResetLocked()
End Sub
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

Cell Class
Cell Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options