Spread for ASP.NET 10 Product Documentation
SetProtect Method
Example 


The boolean value that specifies whether to protect or unprotect spread.
The password to protect or unprotect spread.
Changes the protect structure setting with the password parameter.
Syntax
'Declaration
 
Public Function SetProtect( _
   ByVal protect As Boolean, _
   ByVal password As String _
) As Boolean
'Usage
 
Dim instance As FpSpread
Dim protect As Boolean
Dim password As String
Dim value As Boolean
 
value = instance.SetProtect(protect, password)
public bool SetProtect( 
   bool protect,
   string password
)

Parameters

protect
The boolean value that specifies whether to protect or unprotect spread.
password
The password to protect or unprotect spread.

Return Value

True, if successful; otherwise, false.
Remarks
This method specifies whether the user can make changes at run time such as adding a new sheet.
Example
This example uses the SetProtect method.
FpSpread1.SetProtect(true, "testpassword");
FpSpread1.SetProtect(True, "testpassword")
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FpSpread Class
FpSpread Members

 

 


Copyright © GrapeCity, inc. All rights reserved.