Spread Silverlight Documentation > Developer's Guide > Managing the User Interface > Using Protect and Cell Locking |
You can protect the workbook or sheet and lock cells in the control.
Cells can still be edited if the workbook Protect property is true and the worksheet Protect property is false.
Protecting the workbook and sheet prevents cells from being edited. If you wish to allow the user to edit specific cells, protect the sheet and unlock only the cells you want the user to edit.
Data can be copied from locked cells.
The following example unlocks cells in a protected sheet with the Locked property.
CS |
Copy Code
|
---|---|
gcSpreadSheet1.Sheets[0].Cells[1, 1].Locked = false; private void button1_Click(object sender, RoutedEventArgs e) |
VB.NET |
Copy Code
|
---|---|
GcSpreadSheet1.Sheets(0).Cells(1, 1).Locked = False Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click |