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

TdxSpreadSheetSheetProtectionOptions Class

Stores end-user permission settings for a protected worksheet.

#Declaration

Delphi
TdxSpreadSheetSheetProtectionOptions = class(
    TdxSpreadSheetCustomProtectionOptions
)

#Remarks

This class extends its ancestor with properties that allow you to specify if an end-user is able to perform the following operations in a protected worksheet:

Restricting a specific end-user functionality automatically disables the corresponding built-in and generated UI element(s) of the Spreadsheet or Report Designer control. If a UI element associated with the restricted functionality is available, an attempt to use it raises the EdxSpreadSheetProtectionError exception, displaying the following error message box:

The Protection Exception Example

Note that all end-user permission settings provided by the TdxSpreadSheetSheetProtectionOptions class do not impose any limitations on the capability to perform corresponding actions programmatically.

To enforce the worksheet protection programmatically, assign a new TdxSpreadSheetStandardProtectionInfo or TdxSpreadSheetStrongProtectionInfo class instance to the ProtectionInfo property with the required password passed as the constructor‘s APassword parameter. For detailed information on worksheet password protection, refer to the Worksheet Protection section of the Password Protection topic.

The Table View worksheet’s OptionsProtection property references a TdxSpreadSheetSheetProtectionOptions object.

#Inheritance

See Also