Protect Sheet Dialog

The Protect Sheet dialog allows end-users to protect worksheet elements using an optional password. Worksheet protection locks cells and allows you to only perform specific actions.

DXSpreadsheet_Dialogs_ProtectSheet

Add the Changes group to enable the Protect Sheet button, which invokes the target dialog. Refer to the Lesson 1 - Create a Simple Spreadsheet topic for details on how to provide a Ribbon UI for the SpreadsheetControl.

DXSpreadsheet_Dialogs_ProtectSheet

In a protected sheet, this button displays the "Unprotect Sheet" caption, which invokes a simple dialog that prompts for a password or unlocks the sheet if no password was set.

DXSpreadsheet_Dialogs_ProtectSheet_Unprotect

All worksheet cells are locked by default. When protection is applied to the worksheet, these cells become read-only. However, end-users can allow performing certain actions in a protected worksheet by checking corresponding boxes in the Allow all users of this worksheet to list.

NOTE

The Select locked cells and Select unlocked cells options (the WorksheetProtectionPermissions.SelectLockedCells and the WorksheetProtectionPermissions.SelectUnlockedCells parameters) do not affect the SpreadsheetControl behavior. The cells are always selectable.

See Also