Version

Protect Method (Chartsheet)

Protects the chartsheet without a password.
Syntax
public void Protect( 
   Nullable<bool> allowEditObjects,
   Nullable<bool> allowEditContents
)

Parameters

allowEditObjects
Optional boolean indicating the new value for the Infragistics.Documents.Excel.Charts.ChartsheetProtection.AllowEditObjects.
allowEditContents
Optional boolean indicating the new value for the ChartsheetProtection.AllowEditScenarios.
Remarks

When a Chartsheet is protected without a password, the end user may unprotect the Chartsheet in Excel without having to supply a password. To programatically unprotect a Chartsheet, one may use the Unprotect method.

The optional parameters are used to update the property values of the Infragistics.Documents.Excel.Charts.ChartsheetProtection instance from this Worksheet's Protection property. If the parameter is null, the current value of the associated property will be retained; otherwise the property will be updated with the specified value. For example, if the Infragistics.Documents.Excel.Charts.ChartsheetProtection.AllowEditObjects is currently true and the allowEditObjects is null, then the property will continue to be true but if the allowEditObjects is false the Infragistics.Documents.Excel.Charts.ChartsheetProtection.AllowEditObjects will be changed to false.

Note: If IsProtected is already true, the method will be ignored.

Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also

Reference

Chartsheet Class
Chartsheet Members
HasProtectionPassword
IsProtected
Protection Property
ChartsheetProtection Class
Unprotect()