Skip to main content
Row

Protection.Locked Property

Specifies whether the cell is locked in the protected worksheet. Users cannot edit or delete content in the locked cell, enter new data, or move or resize the cell.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v23.2.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

bool Locked { get; set; }

Property Value

Type Description
Boolean

true to lock the cell if the worksheet is protected; otherwise, false.

Remarks

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;
See Also