Grid/Form Conn Block Edit Other User connected

I have the following scenario:

A grid which in connected via a gridconnector to a mysql database (InnoDB).
A doubleclick opens a details-window with a form attached (which is connected to the same DB).

2 Users are using the webpage.
If userA has the details-form opened, userB should not be able to open the window (to avoid problems which data is the right one). I would like to have a messagebox with “Other user connected; editing not possible.” or sth like that?

Is there a way achieving this?


The default functionality of connectors will not help here, you will need to organize a separate data locking system.