.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Protection.Locked Property

Gets or sets whether the cell is locked if the worksheet is protected.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.1.Core.dll


bool Locked { get; set; }
Property Locked As Boolean

Property Value

Type Description

true, to lock a cell in a protected sheet; otherwise, false.


The following code unlocks the C3 cell of the currently active worksheet when the sheet becomes protected. This cell is editable when the worksheet is locked.

spreadsheetControl1.ActiveWorksheet.Cells[2,2].Protection.Locked = false;
See Also