# In-Cell Editing in KendoReact Grid

To enable in-cell editing in the KendoReact Grid you have to:

1. Set the `editable` prop of the Grid to true and configure its [`edit`](https://www.telerik.com/kendo-react-ui/components/grid/api/gridprops#edit) property to manage the built-in edit state and track which rows are being edited.

   ```jsx
   const [edit, setEdit] = React.useState<EditDescriptor>({});
   ```

   ```jsx
   <Grid
       edit={edit}
       editable={{ mode: 'incell' }}
   >
   ```

2. Handle the `handleItemChange` event of the Grid in order to update the bound data based on the applied edits.

   ```jsx
   const itemChange = (event: GridItemChangeEvent) => {
       if (event.field) {
           setData((data) =>
               data.map((item) =>
                   item.ProductID === event.dataItem.ProductID ? { ...item, [event.field!]: event.value } : item
               )
           );
       }
       setChanges(true);
   };
   ```

3. Handle the [`onEditChange`](https://www.telerik.com/kendo-react-ui/components/grid/api/gridprops#oneditchange) to update the edit state of the Grid.

   ```jsx
   const handleEditChange = (event: GridEditChangeEvent) => {
       setEdit(event.edit);
   };
   ```

You can see a live implementation of this approach in the sample below, where state management and related functions update the Grid’s `data` and its built-in `edit` state.

[Demo Source](https://demos.telerik.com/kendo-react-ui/grid/editing-in-cell/func/source.txt)

## Suggested Links

* [API Reference of the Grid](https://www.telerik.com/kendo-react-ui/components/grid/api/gridprops)
* [API Index of the Grid](https://www.telerik.com/kendo-react-ui/components/grid/api)
