Role-based editable columns
Live in demo 41-healthcare-emr.
Open the live example: Healthcare EMR - inpatient (Industry Templates)
When
Different user roles can edit different cells; the grid hides editors per-row via the editable callback.
How
Key API surface:
editable: (ctx) => ctx.row.original.allowedBy.includes(role)
See the demo source for the full implementation; this recipe pins the pattern + the surface so you can copy-paste it confidently. The doc page that explains the underlying feature in depth is linked from the recipes index.
See also
- Demo 41-healthcare-emr source
- Demo 41-healthcare-emr prompt sidecar - drop into an LLM context window
- Recipes index
Related articles
- Multi-Level (Grouped) Column Headers in SvGrid - Band related columns under a shared parent header using SvGrid's nested column definition - how to nest, pin, combine with sorting and filtering, and when NOT to use grouping.
- An Editable Select / Dropdown Cell in SvGrid - Build a dropdown cell editor in SvGrid using a Svelte 5 snippet - constrain user input to a fixed option set while keeping sort, filter, and undo working on the underlying value.
- A Custom Column Header Menu in SvGrid - Build a per-column header menu for sort, hide, pin, and custom actions using header snippets and your own dropdown component.