Cell access control
Mask cells or restrict editing according to user permissions.
For example, allow regular staff to edit quantities while administrators can also edit unit prices.
View code
Sample data included in the code · 6 rows
Usage guide
#Control which cells each role can read or edit within the same table.
Integration steps
- Define permissions by role
For example, allow regular staff to edit quantities while administrators can also edit unit prices.
- Connect access rules
Define cell access using user, row, and column information. Keep the same rules across display, editing, copying, and export.
- Verify with different accounts
Sign in as each role and inspect reading, editing, and copying. Explain rejected operations to users.
Provide cell presentation and editing behavior appropriate to each role.
This sample has no per-user permissions connected. Client masking does not replace server authorization; restrict sensitive values in server responses too.
Useful terms
- RBAC
- Access control defining allowed operations by user role.
- Masking
- Displaying an obscured representation instead of the original value.
API reference
#Other properties3
| Attribute / Property | Type / Default | Description |
|---|---|---|
| canReadCell | CanReadCellFnDefault: undefined | RBAC read policy. Return `false` from `canReadCell` to mask a cell's value: the grid shows `maskedCellValue` instead of the real value on the direct cell surfaces (body render, tree cells, tooltip, and a clipboard copy), while sort / filter / aggregation / formula keep reading the real value. Property-only; a policy that throws fails CLOSED (masks). Off by default (zero overhead). Export-pipeline masking lands on |
| maskedCellValue | stringDefault: '•••' | The placeholder shown for cells `canReadCell` denies. |
| canEditCell | CanEditCellFnDefault: undefined | RBAC write policy. Return `false` from `canEditCell` to LOCK a cell: the grid refuses to open an editor on it and never writes a value back (blocking a keyboard/click edit, a formula-bar commit, AND a paste). The write-side twin of `canReadCell`; the two are independent (a cell can be readable-but-locked or masked-but-editable). Structural read-only rules (`editable` flag, computed columns, sentinel rows) still apply first — a policy only locks a cell that would otherwise be editable. Property-only; a policy that throws fails CLOSED (locks). Off by default (zero overhead). |
Explore each feature
Learn when to use each feature and how to configure it. Each guide identifies live examples and features you connect in your app.