Example #1
0
 public void Protect(bool protect)
 {
     DevExpress.Spreadsheet.IWorkbook workbook = this.spreadsheetControl.Document;
     if (!workbook.IsProtected && protect)
     {
         workbook.Protect("Password", true, true);
     }
     else
     {
         workbook.Unprotect("Password");
     }
 }