Skip to main content

Set isreadOnly on a Column

Add isreadOnly: true to any column definition to disable editing for that column:
columns:
  outlineNumber:
    title: "#"
    width: 80
    isreadOnly: true
PropertyTypeDefaultDescription
isreadOnlybooleanFalsePrevents user editing of this column
When isreadOnly is true, cells in the column cannot be modified regardless of user permissions or formatter rules.

Use a Read-Only Formatter

An alternative approach uses a formatter with the built-in readOnly style to visually indicate and enforce read-only behavior:
formatters:
  readonly:
    - expression: 'true'
      style: readOnlyStyle

styles:
  readOnlyStyle:
    backgroundColor: 'grey100'

columns:
  outlineNumber:
    title: "#"
    width: 80
    formatter: readonly
    isreadOnly: true
Combining isreadOnly: true with a formatter provides both functional protection (the cell cannot be edited) and a visual cue (the grey background indicates read-only status).

Read-Only Resolution

Powersheet determines read-only status by evaluating three conditions. A column becomes read-only if any of these are true: diagram
  1. Configuration flag: isreadOnly: true is set on the column in the sheet configuration
  2. Historical revision: The user is viewing a historical revision of the document (all columns become read-only)
  3. User permission: The user has a readOnly permission on the document
Certain columns such as outlineNumber are inherently managed by Polarion and should always be set to isreadOnly: true. Workflow properties and server-rendered calculated fields are also automatically read-only.

Property-Level Permissions in the Domain Model

You can also control editability at the domain model level using the readable and updatable properties on entity properties:
domainModelTypes:
  UserNeed:
    properties:
      id:
        readable: true
        updatable: false
      title:
        readable: true
        updatable: true
PropertyDefaultDescription
readableTrueControls whether the property is visible to users
updatableTrueControls whether the property can be modified by users
When updatable is false, the column becomes read-only for that property regardless of the sheet configuration setting.
Use isreadOnly: true in the sheet configuration for quick column-level protection, and updatable: false in the domain model for model-level enforcement that applies across all sheet configurations using that model.

Common Read-Only Patterns

columns:
  outlineNumber:
    title: "#"
    width: 80
    isreadOnly: true
    formatter: readonly
  id:
    title: ID
    width: 80
    isreadOnly: true
  title:
    title: Title
    width: "*"
    hasFocus: true
  description:
    title: Description
    width: "2*"
In this example, outlineNumber and id are read-only with visual indicators, while title and description remain editable.

Verify

After saving the sheet configuration, reload the powersheet document. You should now see read-only columns with a different visual appearance (grey background if a read-only formatter is applied). Attempting to click or type in a read-only cell should have no effect.

See also

KB ArticlesSource Code
  • configContext.ts
  • prod-powersheet-src/com.nextedy.powersheet.client/src/modules/ConfigProvider/ConfigProvider.tsx
  • prod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/sheet/SheetComponent.tsx
  • prod-powersheet-src/com.nextedy.powersheet.client/cypress/fixtures/configurations/whole_rtm.template.yaml
  • powersheet.yaml