# Cell notes

Cell notes add review context or explanations without changing the value. Standalone notes and collaboration comment threads use different storage and APIs, so choose the appropriate workflow first.

Canonical: https://grid.syidax.com/docs/features/cell-notes/

<a id="understand"></a>

## How it works and when to use it

cellNotes is a Pro feature for cells with stable identities and read access. Connect persistent storage through cellNotesAdapter; it does not automatically fall back to browser storage or a collaboration room.

Using this feature in a product requires the Pro package and a valid license. Matching setting names do not enable Pro features in Community.

In the code, grid is the Grid element prepared in the installation chapter. Check each example's data and settings, and implement the app functions and server endpoints for your project.

- [Installation and integration · Shared sample data](https://grid.syidax.com/docs/guides/getting-started.md)

<a id="example-1"></a>

## Example 1. Connect standalone note storage

A server adapter implements load(cell) and save(cell,text,expectedRevision). load must return a note or null, and save must return the GridNoteSaveResult contract.

Verify the result: Assign the adapter and configure getRowId before enabling cellNotes. The server must save atomically only when the expected revision matches, preventing another user's edits from being lost.

<a id="example-2"></a>

## Example 2. Add a collaboration comment

Add a comment to an existing order cell in a Grid that has already joined collaborationRoom.

```javascript
const commentId = await grid.addCellComment('ORD-0001', 'quantity', 'Please verify the quantity.');
if (commentId) {
  await grid.openCellCommentPanel('ORD-0001', 'quantity');
}
```

Verify the result: Without an active collaboration session, the comment API does not substitute for standalone note storage. Check that an ID was returned.

<a id="example-3"></a>

## Example 3. Read and resolve comments

Use an actual ID from the collaboration comment list to change a thread's status.

```javascript
const comments = await grid.getCellComments('ORD-0001', 'quantity');
console.log(comments);
// Use the selected comment's actual commentId to call
// setCellCommentResolved(rowId, field, commentId, true).
```

Verify the result: Deleting a note, resolving a comment, and changing a cell value are separate operations. Do not expose notes separately in your app for cells the user cannot read.

<a id="pitfalls"></a>

## Combining features and troubleshooting

Row indices can change after sorting or filtering, so do not use them as note storage keys. Use stable rowId and column identifiers.

Do not overwrite a save conflict through blind retries. Read the latest server revision and let users compare the content.

<a id="related-api"></a>

## APIs used by this feature

- [cellNotes](https://grid.syidax.com/docs/options/cellNotes.md) — Provides standalone notes for readable cells with stable IDs. Requires a storage adapter and Pro entitlement.
- [cellNotesAdapter](https://grid.syidax.com/docs/options/cellNotesAdapter.md) — Implements standalone note loading and atomic revision-based saving. Does not automatically fall back to temporary built-in storage.
- [openCellCommentPanel](https://grid.syidax.com/docs/methods/openCellCommentPanel.md) — Opens a collaboration comment panel for a row ID and field. Separate from standalone cell note adapters.
- [closeCellCommentPanel](https://grid.syidax.com/docs/methods/closeCellCommentPanel.md) — Closes the collaboration comment panel without deleting comment data.
- [addCellComment](https://grid.syidax.com/docs/methods/addCellComment.md) — Adds a cell comment in an active collaboration session and returns its ID or null.
- [getCellComments](https://grid.syidax.com/docs/methods/getCellComments.md) — Reads collaboration comments associated with a row ID and field.
- [setCellCommentResolved](https://grid.syidax.com/docs/methods/setCellCommentResolved.md) — Changes a comment's resolved state and returns success.
- [deleteCellComment](https://grid.syidax.com/docs/methods/deleteCellComment.md) — Deletes a collaboration comment and returns success.
- [cellCommentsChanged](https://grid.syidax.com/docs/events/cellCommentsChanged.md) — Emitted when cell collaboration comments change. Read the row ID, field, and latest comments.
- [commentMentioned](https://grid.syidax.com/docs/events/commentMentioned.md) — Reports a mention in collaboration comments. Connect app notifications using the target cell and comment.

<a id="next"></a>

## Related reading

- [How rows, columns, and IDs relate](https://grid.syidax.com/docs/guides/concepts.md)
- [Connect results and events](https://grid.syidax.com/docs/guides/data-event-access.md)
- [Explore in Features](https://grid.syidax.com/grid/cell-notes) — The guide describes which interactions are available to try.
