officefileapi-devexpress-dot-spreadsheet-dot-protection.md
Specifies whether the cell is locked in the protected worksheet. Users cannot edit or delete content in the locked cell, enter new data, move, or resize the cell.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
bool Locked { get; set; }
Property Locked As Boolean
| Type | Description |
|---|---|
| Boolean |
true to lock the cell if the worksheet is protected; otherwise, false.
|
The following code unlocks the “C3” cell in the active worksheet. If you apply protection to this sheet, the cell remains editable in the Spreadsheet control’s UI.
spreadsheetControl1.ActiveWorksheet.Cells[2,2].Protection.Locked = false;
spreadsheetControl1.ActiveWorksheet.Cells(2,2).Protection.Locked = False
See Also