Depends on what you want really. Do you have requirements? Are you fishing for suggestions?
One possible solution
If you have an explicit save action that is invoked when editing is complete,
- User navigates to page,
- User modifies table,
- User "saves",
- Page retrieves current values from datastore (as of time of save)
- Page compares current values to modified values
- Any conflicts are highlighted and requests user "resolve" the conflict
- Goto step 3. until there are no conflicts detected
Another possible solution
If you want to avoid that step 3. to step 7. loop, you could always wrap steps 4. through 6. in a transaction, meaning every other attempt to save blocks until current save is resolved. This is pretty heavy handed and requires a bit more work and may effectively reduce overall concurrency.
Yet another possible solution
Another possible solution is to make the process less discrete and more continuous. Provide a live feed of data.
- Create a WindowsService/WCF Service that pushes or allows polling of table data,
- Page polls for data or asynchronously receives data from remote service,
- Page modifies user's page contents with received data
- New values that do not conflict are temporarily highlighted in one colour (indicating conflict-free change), say light green
- New values that do conflict are permanently highlighted in red
If you have a save process, no red values may be saved until resolved.
Last (suggested) possible solution
If you have no explicit save action,
- User clicks on a cell (effectively requesting to edit a cell)
- Page communicates to Windows\WCF service requesting a "lock" on that cell,
- If no other user has requested a "lock" on that particular cell, then lock cell to that user and return true. If another user has requested lock on that particular cell, then respect current lock and return false.
If remote service returns false, then use-case ends, and cell cannot be modified. If remote service returns true, then user modifies contents and when they leave the cell or reloads page or whatever, the remote service releases the lock.
Conclusion
Alright, a bit of hand waving, but more than enough fat to chew. Give it some thought, there are many possible solutions.