Close DataGrid inline editor programatically


when I inline edit a datagrid after finishing editing a record, the focus jumps automatically to the next row and starts editing the next record. This behavior is expected and posses no problem. But at certain situations of the user interaction, I would like the inline editor to close and display the view render state of the datagrid’s rows.

Have been looking for a way to do this, but there seems not to be a straightforward way of closing the inline editor programatically. This means that when you start editing a datagrid, no matter what you do, what row you are in, you will be always inline editing a record. I would like to close it and display the plain table.

There’s no method such as closeEditor() or cancelEditing()…

Any ideas?



to programmatically close inline editor try the following code:

dataGrid.withUnwrapped(JmixGrid.class, jmixGrid -> {