Multi user update and locking in grids

Two users are viewing the same grid with same data on two different pc’s.

User A - Edits a cell or drag n drop a row.

User B - Sees cell (being edited by user A) or row (being dnd by user A) as locked and sees the update made by user A immediately without manually refreshing the grid.
how do I implement this User B functionality? Any thoughts?

You can refresh grid data with some timeout with following code:

grid.clearAll(); grid.load(url); //load updated data to the grid