ig.excel.WorksheetProtection

Provides information about the types of changes that are disabled when the associated Worksheet is protected.

Remarks

When a Worksheet is protected, the contents of unprotected cells may be edited by the end-user. One way to unprotect a cell is to change the IWorksheetCellFormat.locked property to false. Such cells may be edited by all users. Another way to unprotect cells is using the WorksheetProtection.allowedEditRanges. This is a collection of WorksheetProtectedRange instances that define a range of cells that is optionally protected by another password. For any other cells, the Worksheet would need to be unprotected first. A Worksheet may be programatically unprotected using the Worksheet.unprotect method.

The WorksheetProtection.selectionMode property is used to control which cells the end user may select when the Worksheet has been protected. This property may be set before or after protecting a Worksheet.

Many of the other properties of this class are read-only (e.g. WorksheetProtection.allowDeletingColumns). The state of these properties are optionally set when the Worksheet is protected (e.g. using the Worksheet.protect method.

Dependencies

jquery-1.4.4.js
infragistics.util.js
The current widget has no options.
The current widget has no events.
  • allowDeletingColumns

    .allowDeletingColumns( );

    Returns a boolean indicating if the deletion of columns is allowed in a protected worksheet.

  • allowDeletingRows

    .allowDeletingRows( );

    Returns a boolean indicating if the deletion of rows is allowed in a protected worksheet.

  • allowedEditRanges

    .allowedEditRanges( );

    Returns a collection of WorksheetProtectedRange instances that define which locked ranges of cells may be edited in a protected worksheet.

    Remarks

    When a Worksheet is protected the only cells that may be edited are those whose IWorksheetCellFormat.locked property has been set to false. All other cells are not editable by default. One can make additional cells or ranges of cells editable via this collection. The WorksheetProtectedRange instances specify the range to which it applies and optionally a password that may be used to unlock that range.

  • allowedEditRanges

    .allowedEditRanges( index:number );
    Return Type:
    ig.excel.WorksheetProtectedRange
    Return Type Description:
    The range at the specified index.

    Gets the range at the specified index in the collection.

    • index
    • Type:number
    • The zero-based index of the range to get.

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException index is less than zero or index is greater than or equal to WorksheetProtectedRangeCollection.count.
  • allowEditObjects

    .allowEditObjects( );

    Returns a boolean indicating if objects such as shapes, comments, charts and controls may be created or changed when the worksheet is protected.

  • allowEditScenarios

    .allowEditScenarios( );

    Returns a boolean indicating if existing scenarios are protected when the worksheet is protected.

  • allowFiltering

    .allowFiltering( );

    Returns a boolean indicating if the user may use an auto filter created before the worksheet was protected.

  • allowFormattingCells

    .allowFormattingCells( );

    Returns a boolean indicating if the user may change the formatting of cells in a protected worksheet.

  • allowFormattingColumns

    .allowFormattingColumns( );

    Returns a boolean indicating if the user may change column information such as its width or visibility in a protected worksheet.

  • allowFormattingRows

    .allowFormattingRows( );

    Returns a boolean indicating if the user may change row information such as its height or visibility in a protected worksheet.

  • allowInsertingColumns

    .allowInsertingColumns( );

    Returns a boolean indicating if the user may insert columns in a protected worksheet.

  • allowInsertingHyperlinks

    .allowInsertingHyperlinks( );

    Returns a boolean indicating if the user may insert hyperlinks in unlocked cells in a protected worksheet.

  • allowInsertingRows

    .allowInsertingRows( );

    Returns a boolean indicating if the user may insert rows in a protected worksheet.

  • allowSorting

    .allowSorting( );

    Returns a boolean indicating if the sorting is allowed in a protected worksheet.

  • allowUsingPivotTables

    .allowUsingPivotTables( );

    Returns a boolean indicating if the user can change pivot tables in a protected worksheet.

  • selectionMode

    .selectionMode( );

    Returns an enumeration used to indicate how cell selection should be affected when the associated Worksheet is protected.

  • selectionMode

    .selectionMode( value:ig.excel.WorksheetProtectedSelectionMode );

    Sets an enumeration used to indicate how cell selection should be affected when the associated Worksheet is protected.

    • value
    • Type:ig.excel.WorksheetProtectedSelectionMode

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.