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:
Delete columns and rows (AllowDeleteColumns and AllowDeleteRows).
Manage floating containers and hyperlinks (AllowEditContainers and AllowEditHyperlinks).
Insert columns and rows (AllowInsertColumns and AllowInsertRows).
Resize columns and rows by using header sizing handles (AllowResizeColumns and AllowResizeRows).
Modify cell formatting (AllowFormatCells).
Sort values in unlocked cells (AllowSort).
Select only unlocked or all cells (AllowSelectUnlockedCells and AllowSelectLockedCells).
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:
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.