LyteNyte Grid logo for light mode. Links back to the documentation home page.
Cell Editing

Linked Cell Edits

LyteNyte Grid handles edits on a cell-by-cell basis but applies changes to the entire row. This allows you to link cells so that updating one value automatically updates others within the same row.

Note

This guide builds on the concepts covered in the Cell Editing and Cell Edit Renderers documentation. We recommend reviewing those topics before proceeding.

Editing Linked Cells

A standard edit renderer calls the changeValue method on the EditParams passed to the renderer. The changeValue method updates only the edit value for the cell currently being edited. To create a linked cell edit, use the changeData method instead, and provide new edit values for all cells that should update when the edited cell changes.

In the demo below, the Product column is linked to the Price column. Selecting a new product automatically updates the Price to that product’s default value.

Linked edits don’t have to be bidirectional. Editing Product updates Price, but editing Price does not change the selected product.

Updating Linked Cells

Fork code on stack blitzFork code on code sandbox

Tip

A cell edit does not have to update another editable cell. You can create linked edits that update cells which are not themselves editable.

Next Steps