columns, data and getRowId to useDataGrid and keep each edit by setting data from onDataChange, here on bookings with guests, their countries, statuses and check-in times.meta.variant, from text, dates and times to a person, a color and a cascading path, each with its cell and editor.meta.editable to false to lock one column, or pass readOnly to lock the whole grid, here from a checkbox.meta.required or meta.validate to keep an invalid value out: the editor stays open with the message until you fix it or press Esc.onRowAdd for an Add row button, and onRowsDelete and onRowsDuplicate for the actions on selected rows.DataGridToolbar sets the row height from short to extra tall, and taller rows show more lines of long text.editTrigger: "click" in useDataGrid so one click selects a cell and opens its editor at once.cellColors for a Color button and actionBarMinCells={1} so clicking one cell opens the ActionBar to paint it.onRowsDuplicate and onRowsDelete are set.columnPinning in initialState to keep Guest at the start and Total at the end, and drag a header edge to resize.