Skip to main content

TdxSpreadSheetSheetProtectionOptions Class

Stores end-user permission settings for a protected worksheet.

Declaration

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