RPM grid editing: Implementation of some logic (to be continued)