diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java index 7ce709fd33..da0d297da6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java @@ -376,8 +376,13 @@ public class GridView extends Vbox implements EventListener } else { if (renderer.isEditing()) { renderer.stopEditing(false); - if (((renderer.getCurrentRowIndex() - pgIndex) / pageSize) == pgNo) { - listModel.updateComponent(renderer.getCurrentRowIndex() % pageSize); + int editingRow = renderer.getCurrentRowIndex(); + if (editingRow >= 0) { + int editingPgIndex = editingRow % pageSize; + int editingPgNo = (editingRow - editingPgIndex) / pageSize; + if (editingPgNo == pgNo) { + listModel.updateComponent(renderer.getCurrentRowIndex() % pageSize); + } } } }