> For the complete documentation index, see [llms.txt](https://gebra-it.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gebra-it.gitbook.io/wiki/client-api-reference/events/oninlineedited.md).

# onInlineEdited

The event occurs when a data cell in a grid has been modified via inline edit. The grid must have the Inline Edit setting set to 'enabled' for this to happen.

The eventArgs object is available in the event. It contains the following information:

* eventArgs.details.oldData: a complete listing of the data row **before** the modification
* eventArgs.details.newData: a complete listing of the data row **after** the change
* eventArgs.details.changedData: **only** the changed data

Each element always contains the id of the record.

### Example:

Example response for a change:

```javascript
eventArgs.details =
    {
        "oldData": {
            "id": 2,
            "inlText": "Text115",
            "inlNumber": 115,
            "inlFloat": 3,
            "inlCheckbox": true,
            "inlCombo": 2,
            "inlCombo_value": "Option 2",
            "inlDate": "2023-09-08",
            "inlDateTime": "2023-09-14T09:39:00"
        },
        "newData": {
            "id": 2,
            "inlText": "Text112",
            "inlNumber": 115,
            "inlFloat": 3,
            "inlCheckbox": true,
            "inlCombo": 2,
            "inlCombo_value": "Option 2",
            "inlDate": "2023-09-08T00:00:00",
            "inlDateTime": "2023-09-14T09:39:00"
        },
        "changedData": {
            "id": 2,
            "inlText": "Text112"
        }
    }
```

Code example to check if a specific field was changed:

```javascript
//check which field was changed
for (let key in eventArgs.details.changedData) {
    if (key == "inlText") {
        //your code here if you want to do something
        //example: you want to change the field inlNumber
        eventArgs.details.newData.inlNumber = 99;
    }
}
```
