Spread for ASP.NET 11 Product Documentation
SetProtect Method
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class : SetProtect Method
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")
See Also

Reference

FpSpread Class
FpSpread Members