Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Protect Workbook Dialog

The Protect Structure and Windows dialog allows end-users to protect the workbook using an optional password.

DXSpreadsheet_Dialogs_ProtectWorkbook

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

DXSpreadsheet_Dialogs_ProtectWorkbook_Ribbon

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

DXSpreadsheet_Dialogs_ProtectWorkbook_Unprotect

Checking the dialog check boxes enables the following types of protection:

  • Structure - prevents other users from moving, deleting, adding, hiding and renaming worksheets, as well as displaying hidden worksheets;
  • Windows - restricts changes to the window’s position by freezing/unfreezing panes.

Tip

Use the IWorkbook.Protect method to protect a workbook’s structure and windows in code, or the IWorkbook.Unprotect method to remove protection.